LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-27-2004, 03:47 PM   #1
exeon
LQ Newbie
 
Registered: Oct 2004
Posts: 5

Rep: Reputation: 0
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
...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
what is uid and gid rmanocha Linux - Software 9 08-18-2008 11:03 PM
What is my uid/gid? Jeebizz Slackware 2 11-22-2005 11:39 AM
How can I change a user's uid and gid? homesp Debian 2 05-31-2005 02:39 PM
mounting an iso9660 with uid and gid set to user cwin Linux - Software 3 12-22-2004 05:45 PM
changing uid, gid zeke1955 Linux - General 4 01-09-2004 11:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration