jamespetts Posted October 10, 2002 Report Share Posted October 10, 2002 I am having problems with giving a non-root user permission to write files in remote Samba shares. I have a directory called /mnt/Documents (which connects to a drive on a Windows 2000 system), and whilst the root user can read and write to it, the permissions are not set for the standard user (james) to do the same. So, I try chmod a+w /mnt/Documents and it made no difference. I tried chmod o+w /mnt/Documents, and still no effect. I tried chown james /mnt/Documents, but it said, "Operation not permitted". I tried to do it from the Konquorer GUI client, but it froze and had to be killed. Am I missing something here? All that I want to be able to do is use /mnt/Documents (and all subfolders) as the place where I store all my user files on both the Windows 2000 and Linux machine. What do I have to do to accomplish that? (I am using Mandrake 8.2). Thank you in advance. James E. Petts Quote Link to comment Share on other sites More sharing options...
Guest frew Posted October 10, 2002 Report Share Posted October 10, 2002 I don't remember how to do it with samba (i switched to ftp a while back) but I am pretty sure that instead of chmod'ing you need to chown it. Read the chown man file. pretty simple stuff. On my ftp server (and my old samba) I had a bunch of dirs people had access to but couldn't upload to, and one upload directory. Not to hard to do. Quote Link to comment Share on other sites More sharing options...
jamespetts Posted October 10, 2002 Author Report Share Posted October 10, 2002 I tried that, unmounting then using chown, but they reverted to root ownership as soon as I remounted them (mount -a). Quote Link to comment Share on other sites More sharing options...
Guest demoniko Posted October 10, 2002 Report Share Posted October 10, 2002 try chown while they are mounted Quote Link to comment Share on other sites More sharing options...
jamespetts Posted October 11, 2002 Author Report Share Posted October 11, 2002 I did. It said, "Operation not permitted" even when I was root. Quote Link to comment Share on other sites More sharing options...
ranger Posted October 13, 2002 Report Share Posted October 13, 2002 Note that most windows-type filesystems don't support the setting of individual permissions on files. So, you must apply the permissions at mount time, which will apply to all files accessed by the mount point. It gets a bit sticky with permissions on the files on the server side (with NT/Win2k running on NTFS on the server). To change the permissions, unmount the share, and use 'uid=','gid=', and 'umask=' options. For my fat32 data share, I normally use 'uid=501,gid=502,umask=027', which gives me (I have uid 501) ownership and all permissions, the group with gid 502 has everything by write (the 2), and no one else has any permissions on the files. (The umask defines which permission bits may not be set, so setting 2 prevents w access, setting 4 prevents r access, and setting x prevents execute, or for directories, enter. Then, just add them up, to get 7, for example). Then, remount the share. Quote Link to comment Share on other sites More sharing options...
jamespetts Posted October 13, 2002 Author Report Share Posted October 13, 2002 Thank you very much :-) This has solved the problem. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.