smbfs uid gid write as normal user
smbfs seems to have trouble with the access permissions on samba drives.
the numerical userid and the groupid are exported from the samba server. while this is a nice feature, it's practically useless because they are of course different on the client machine. specifying them with "smbmount //server/share mountpoint -o uid=user,gid=group does not have the desired effect.
so I hacked into the file /usr/src/linux/fs/smbfs/inode.c and changed the following. this results in all the files belonging to root but with read/write permissions for all.
hope I could help
/usr/src/linux/fs/smbfs/inode.c:
...
smb_set_inode_attr(struct inode *inode, struct smb_fattr *fattr)
...
// START Hack by exeon
inode->i_mode = fattr->f_mode | 0666;
inode->i_nlink = fattr->f_nlink;
inode->i_uid = 0;
inode->i_gid = 0;
// END hack by exeon
...
|