Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Centos 6 SMB Mount Problem

Featured Replies

Hello,

 

I'm having a problem when I mount my share using SMB on CentOS 6. When I mount it forces the directory I mounted it to, to have permissions of only 755. Since I'm uploading to the share over PHP I need to have it be 777 thats the only way it will work.

 

When I mount the share on CentOS 5.7 it works perfect. I dont make any changes or anything it mounts it as 777 and uploads work as they should but CentOS 6 no deal its always 755 no mater what I do.

 

I need to get this fixed but can't figure out whats going on. I'm using 5.0 Beta-14 (Yea I know Old but its been reliable)

 

I'm using this command to mount the share on the server

 

mount -t cifs -o username=user,password=pass //xxx.xxx.xxx.xxx/server /mounts/mount1

 

Does anyone know how to fix this issue so the share will mount on CentOS 6 with 777 permissions.

 

Why not use NFS?

 

Sent from my SGH-I727R using Tapatalk 2

 

  • Author

Why not use NFS?

 

Sent from my SGH-I727R using Tapatalk 2

 

 

SMB performs better and its going across the public internet.

  • Author

I tried some more things and looked around a bit and still can't figure this out. Everything is changed to 755 automatically when mounting on CentOS6. If I try and change a folder to 777 it will be 755 no matter what on cents 6 but on cents 5 it will be 777.

Try asking within a CentOS specialty forum as there's obviously some difference between the CentOS 5.7 and 6.0 distros.

Hi,

 

Sorry, am I  missing something here.  Why 777.  That's a big security hole.

 

This means the file is Executable, Readable and Writable by the World, Group and Owner on that system.  Please let me explain.

 

In file security on a Linux system, when you say 777 the first 7 tells you how the 'World' access that file.  With a 7 in that position you are saying that EVERYONE properly authenticated to your network weather on your server physically, or authenticated through LDAP, will have Read, Write and Execute privileges to that file.

 

Next is Group access, With a 7 set for group access, anyone assigned to that group will have full (Read, Write and Execute) privileges.  Lastly the last 7 is Owner access, which tells me that the Owner has full privileges also.  Remember that Text files can be executed as programs.  You should NEVER set the execute bit unless that text file is a script (Pearl, Python shell script) of some kind.  Remember the Acronym WGO (World, Group, Owner) when trying to understand how this works.

 

so

WGO
777

 

Essentially EVERYONE that has access to that server would be able to do something with that file.

 

Really, why do you need 777? Why does it only work on 777.  You should be asking yourself these questions.  Only grant access to files with enough security to do the job.  NOTHING MORE. Get into the habit of setting up the security correctly to begin with, and understanding what file security means in a Linux/Unix world.

 

Granted if this is for home, then there is really no issue, but in an enterprise environment, this is a huge no no.

 

CentOS 6 had a major upgrade to Samba.  You will need to read the docs and examine your config file to make sure you have the options set correctly to make sure the share is setting the file permissions correctly when writing the file. 

 

--Sideband Samurai

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.