How are file permissions determined under Samba? If I log onto my Linux server (terminal session using Putty) and create a file that file is given the following file permissions (rw- rw- r--). That is correct, because in my home directory I have a .bashrc file that has a umask command that states umask 002. However, when I use Samba to log onto my Linux server and use Word/Excel to create a file that file is given the following file permissions (rwx rw- ---). Also, if I edit an existing file (again using Word/Excel) the file permissions/ownership of this file changes (ie if the file permissions aren't rwx rw- --- then they are after I edit a file). How can I determine/set file permissions for files and stop file permissions/ownership of files from changing. Martin Stacey Information Support Manager Safcol Australia Pty Ltd -------------- next part -------------- HTML attachment scrubbed and removed
How are file permissions determined under Samba? If I log onto my Linux server (terminal session using Putty) and create a file that file is given the following file permissions (rw- rw- r--). That is correct, because in my home directory I have a .bashrc file that has a umask command that states umask 002. However, when I use Samba to log onto my Linux server and use Word/Excel to create a file that file is given the following file permissions (rwx rw- ---). Also, if I edit an existing file (again using Word/Excel) the file permissions/ownership of this file changes (ie if the file permissions aren't rwx rw- --- then they are after I edit a file). How can I determine/set file permissions for files and stop file permissions/ownership of files from changing. Martin Stacey Information Support Manager Safcol Australia Pty Ltd
Hi Martin, Samba has some file permission parameters in smb.conf that determine how it will set permissions on new files (when excel and other microsoft applications 'edit' files, they effectively make a new file and copy the edited information into that, removing the original file); Take a look at the discussion "File Permissions and Attributes on MS-DOS and Unix" on page 135 of the "Using Samba" book by O'Reilly for detailed information: the parameters you would be interested in are 'map archive, map system, map hidden', 'create mask, directory mask, force create mode, force directory mode'... You can order a hardcopy of this book (essential to any Samba administrator, in my opinion) from amazon.com, or other online bookstores, or you can access an html version straight off the web at this url: http://us2.samba.org/samba/oreilly/using_samba/ <http://us2.samba.org/samba/oreilly/using_samba/> Hope this helps, don -----Original Message----- From: Martin Stacey [mailto:martin@safcol.com.au] Sent: Sunday, January 28, 2001 5:21 PM To: Samba Subject: File permission How are file permissions determined under Samba? If I log onto my Linux server (terminal session using Putty) and create a file that file is given the following file permissions (rw- rw- r--). That is correct, because in my home directory I have a .bashrc file that has a umask command that states umask 002. However, when I use Samba to log onto my Linux server and use Word/Excel to create a file that file is given the following file permissions (rwx rw- ---). Also, if I edit an existing file (again using Word/Excel) the file permissions/ownership of this file changes (ie if the file permissions aren't rwx rw- --- then they are after I edit a file). How can I determine/set file permissions for files and stop file permissions/ownership of files from changing. Martin Stacey Information Support Manager Safcol Australia Pty Ltd
Hi, Everytime users want to create a folder in the share, they get a prompt saying "They may not be able to access the folder". If they go ahead, they can still creat sub-folders, but cannot copy files to the folder. Would someone please give me some help? My config is as follows, [proj] comment = Project Documents path = /srv/proj read only = no create mask = 0660 directory mask = 0770 hide unreadable = yes [root@smbserver baseband]# getfacl general # file: general # owner: root # group: Domain Users user::rwx group::--- group:Proj Base Team:rwx group:Proj Base Man:rwx group:Proj Readers:r-x group:Bak Admins:rwx mask::rwx other::--- default:user::rwx default:group::--- default:group:Proj Base Team:rwx default:group:Bak Admins:rwx default:mask::rwx default:other::--- [root@smbserver general]# pwd /srv/proj/baseband/general **nmun cannot copy files into packaging** [root@smbserver general]# getfacl * # file: packaging # owner: nmun # group: Domain Users user::rwx group::rwx group:Proj Base Team:rwx group:Bak Admins:rwx mask::rwx other::--- default:user::rwx default:group::--- default:group:Proj Base Team:rwx default:group:Bak Admins:rwx default:mask::rwx default:other::--- Regards, Norman
Norman Zhang wrote: ----------------->>>> Everytime users want to create a folder in the share, they get a prompt saying "They may not be able to access the folder". If they go ahead, they can still creat sub-folders, but cannot copy files to the folder. Would someone please give me some help? My config is as follows, [proj] comment = Project Documents path = /srv/proj read only = no create mask = 0660 directory mask = 0770 hide unreadable = yes ----------------->>>> try using: create mode = 0660 directory mode = 0770
Norman, Add in your smb.conf file, in section of share: force create mode = 777 force directory mode = 777 Brazilian Regards Tiago Cruz Em Qui, 2003-03-06 ?s 18:51, Norman Zhang escreveu:> Hi, > > Everytime users want to create a folder in the share, they get a prompt > saying "They may not be able to access the folder". If they go ahead, they > can still creat sub-folders, but cannot copy files to the folder. Would > someone please give me some help? My config is as follows, > > [proj] > comment = Project Documents > path = /srv/proj > read only = no > create mask = 0660 > directory mask = 0770 > hide unreadable = yes > > [root@smbserver baseband]# getfacl general > # file: general > # owner: root > # group: Domain Users > user::rwx > group::--- > group:Proj Base Team:rwx > group:Proj Base Man:rwx > group:Proj Readers:r-x > group:Bak Admins:rwx > mask::rwx > other::--- > default:user::rwx > default:group::--- > default:group:Proj Base Team:rwx > default:group:Bak Admins:rwx > default:mask::rwx > default:other::--- > > [root@smbserver general]# pwd > /srv/proj/baseband/general > > **nmun cannot copy files into packaging** > > [root@smbserver general]# getfacl * > # file: packaging > # owner: nmun > # group: Domain Users > user::rwx > group::rwx > group:Proj Base Team:rwx > group:Bak Admins:rwx > mask::rwx > other::--- > default:user::rwx > default:group::--- > default:group:Proj Base Team:rwx > default:group:Bak Admins:rwx > default:mask::rwx > default:other::--- > > Regards, > Norman
Hello, I have troubles with files permissions, on my Samba server, i have made a public folder. When I want to browser this public folder on win2k, i see all the files and folder directly under the public folder: Public older | | | titi toto file.conf but when i enter a folder, all the files are hidden (on Linux there are files but i can't see it on win2k): titi | All the files are set to 744 permission. So it is normally all readable. I am really lost so help would be welcome ^_^ Thanks JF