August 21, 201213 yr 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.
August 21, 201213 yr Author Why not use NFS? Sent from my SGH-I727R using Tapatalk 2 SMB performs better and its going across the public internet.
August 21, 201213 yr 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.
August 21, 201213 yr Try asking within a CentOS specialty forum as there's obviously some difference between the CentOS 5.7 and 6.0 distros.
August 21, 201213 yr 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
August 22, 201213 yr It's actually user/group/other (ugo). Since samba interprets the permissions bits in its own unique way using 777 will cause problems with SMB clients, e.g, files with 777 permissions will be hidden when the share is viewed in Windows. See here: http://oreilly.com/openbook/samba/book/ch05_03.html#ch05-56404
Archived
This topic is now archived and is closed to further replies.