LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   samba permissions Issues (https://www.linuxquestions.org/questions/linux-server-73/samba-permissions-issues-706533/)

cougar97536 02-21-2009 08:54 PM

samba permissions Issues
 
Hey all, I am running Ubuntu Server 8.10, and trying to setup a samba box. I have samba configured so that the proper folders are shared, and all the windows workstations (xp & vista) can see the shares. My problem is a permissions issue. if I issue the command
sudo chmod -R 770 folderName
then whoever writes to a file first has full access. however the permissions are being set to something like owner rwx group r__ other ___ . this is not what I want at all... any Idea how I can stop the file permissions from changing during editing? Excel 2003...
thanks for your help,
Christopher King

ps: it has been suggested that it might be something called "Opportunistic locking" but I have no real understanding of what this is...

jschiwal 02-21-2009 09:42 PM

Is only one user or group allowed to access the share?

You don't want to set the 'x' bit on files in a share. You do need them for directories.

Check if you have a "create mask" entry in your smb.conf file. The default is 0744. Also check for "directory mask". The default is 0744.

A Linux user saving a file will have the umask environment variable mask of bits of created files.

If you have more than one user that is able to write to the share, you want to enable the 'o' bit on the share's directory. The default for a public share is the same as the /tmp directory, created with "chmod ugo=rwxt". The sticky bit prevents one user from deleting the file of another user.

Also look at "force create mode" and "force directory mode" if you want documents and directories to have certain unix permissions set (or'ed).

I think that opportunistic locking will only affect files that are being edited by another user, not after they are done.

cougar97536 02-21-2009 11:40 PM

thanks
 
Thank you, that SEEMS to have fixed the issue, I just added the following lines to the smb.conf file

create mask = 0770
directory mask = 0770

and it seems to no longer have any permission issues...
have a great one,
Christopher King


All times are GMT -5. The time now is 06:25 AM.