Greetings- I am working through coming up with a Linux client integration to Samba PDC's. I mount several shares with this sort of syntax: /bin/mount -t cifs -o credentials=/home/userid/.smbcredentials,uid=userid,gid=userid,dmask=0777,fmask=0666 //ldslnx01/data /mnt/ldslnx01/data/ However when I create new files/dirs on the Samba share from the Linux workstation, the perms are not 0666/0777 as I have specified. Historically I set those perms on the share, and that has always worked with Windows clients. I added that bit to the mount command, but it made no difference. I believe I end up with 0755/0644, but do not hold me to that as I have simply verified it is not correct and that is all the checking I have done. Thanks! -- Michael Lueck Lueck Data Systems http://www.lueckdatasystems.com/
Scott Lovenberg
2008-Feb-13 18:47 UTC
[Samba] Re: Wrong perms on new files/dirs using smbmount
Michael Lueck wrote:> Greetings- > > I am working through coming up with a Linux client integration to Samba > PDC's. > > I mount several shares with this sort of syntax: > /bin/mount -t cifs -o > credentials=/home/userid/.smbcredentials,uid=userid,gid=userid,dmask=0777,fmask=0666 > //ldslnx01/data /mnt/ldslnx01/data/ > > However when I create new files/dirs on the Samba share from the Linux > workstation, the perms are not 0666/0777 as I have specified. > > Historically I set those perms on the share, and that has always worked > with Windows clients. > > I added that bit to the mount command, but it made no difference. > > I believe I end up with 0755/0644, but do not hold me to that as I have > simply verified it is not correct and that is all the checking I have done. > > Thanks! >I think you'll find that is your default umask (more specifically, your umask is 022, i.e., (7-0)(7-2)(7-2)=755) It must be overriding. I'm not sure why this would be, though. Could it be that '/' is mounted with an explicit permission setting that is shadowing your mount settings?
Michael Lueck
2008-Feb-13 19:39 UTC
[Samba] Re: Wrong perms on new files/dirs using smbmount
Scott Lovenberg wrote:> Could > it be that '/' is mounted with an explicit permission setting that is > shadowing your mount settings?I do not think so, but have a look. This share happens to be on the /srv partition. /dev/sda1 / xfs defaults 0 1 /dev/sda9 /srv xfs defaults 0 2 -- Michael Lueck Lueck Data Systems http://www.lueckdatasystems.com/
On Wednesday 13 February 2008, Michael Lueck wrote:> I mount several shares with this sort of syntax: > /bin/mount -t cifsSubject line is misleading: smbmount != cifs. -- Chris
Michael Lueck
2008-Feb-14 02:03 UTC
[Samba] Re: Wrong perms on new files/dirs using smbmount
Chris Smith wrote:> On Wednesday 13 February 2008, Michael Lueck wrote: >> I mount several shares with this sort of syntax: >> /bin/mount -t cifs > > Subject line is misleading: smbmount != cifs.I get the idea from man smbmount that smbmount is merely a wrapper invoking mount -t cifs. Would you expect different results if I were using the smbmount binary instead? If so, I would gladly test that method. -- Michael Lueck Lueck Data Systems http://www.lueckdatasystems.com/
Michael Lueck
2008-Feb-15 01:16 UTC
[Samba] Re: Wrong perms on new files/dirs using smbmount
Chris Smith wrote:> Smbclient is new to the conversation, which until now has been about > smbmount whichMy error. Yes, I meant smbmount and not smbclient.>> So "mount -t cifs" would be the most correct way to make a >> connection? > > It is considered the best way under the vast majority of circumstances > to mount an smb share.Very well then, I will stick with my current syntax. -- Michael Lueck Lueck Data Systems http://www.lueckdatasystems.com/
Possibly Parallel Threads
- Wrong perms on new files/dirs using `mount -t cifs`
- cifs verses smbfs for Linux clients
- Recent inability to view long filenames stored with scp via samba mount
- What file gets corrupted in Samba when perms stop working correctly?
- Recent inability to view long filenames stored with scp via samba mount