Click to See Complete Forum and Search --> : setting file permissions on SMB share


mistafeesh
03-03-2004, 06:36 AM
I have a Mac sharing files with my PC and Linux box with samba.

I really need to be able to set specific file/directory permissions on one of the two shares, on the Linux box as it is being used for web serving.

here's the relevant bit of my smb.conf from the mac:

client code page = 437
coding system = utf8
guest account = dan
encrypt passwords = yes

[work]
path = /Work/
browseable = yes
writeable = yes
comment = work
guest account = dan
public = yes

[websites]
path = /Work/Websites
browseable = yes
writeable = yes
comment = websites
guest account = dan
public = yes

here's the relevant bit from my /etc/fstab on the Linux machine://oxdance/work /home/dan/work smbfs
auto,uid=dan,fmask=0664,iocharset=iso8859-15,credentials=/etc/smbpass
//oxdance/websites /home/dan/public_html smbfs
auto,uid=dan,iocharset=iso8859-15,credentials=/etc/smbpass

If I set permissions on the Mac, they don't change on the Linux box, and I can't set them on the Linux box , because I have "insufficient priveledges".

mdwatts
03-03-2004, 03:35 PM
Have you tried any JL forum searches, especially these for 'samba file permission' (http://justlinux.com/forum/search.php?s=&action=showresults&searchid=898377&sortby=lastpost&sortorder=descending)?

Some mention using fmask and dmask on the Samba mount.

Hayl
03-03-2004, 03:44 PM
here is what you are looking for - example from my box.

//homesrvlinux01/music /mnt/music smbfs credentials=/home/ddicks/.smbpassword,uid=ddicks,gid=music-users,fmask=750,dmask=750 0 0

specifically, the gid,uid,fmask,and dmask

mistafeesh
03-03-2004, 04:26 PM
hmmm. I took fmask and dmask off already, in an attempt to solve this. A search, BTW was fairly unfruitful. I guess I have a slightly unusual problem, in that I need to be able to set specific file permissions.

This is because I am using the linux box to test websites as I am building them, and eventually to serve some of them publically. Some of the files need to have 644, some need to have 777 etc...I don't even know if this is possible with SMB, but it'd be a pity to have to move over to, say, NFS, which is probably better suited to the task, because of the Win98 machine on the network...and also because I've never used it before.

mistafeesh
03-04-2004, 12:21 PM
dang. This thread is looking a bit dead in the water. I think it's probably an impossibility to get samba to do this. what about if I share from the Mac with NFS, and then re-share from the Linux box with SMB so the PC can see it?

Can you keep permissions on NFS shares?