LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Can't get RW permission on a mounted samba share (https://www.linuxquestions.org/questions/linux-software-2/cant-get-rw-permission-on-a-mounted-samba-share-128624/)

darkangel12613 12-24-2003 09:09 AM

Can't get RW permission on a mounted samba share
 
I have mounted a samba share form my WinXP machine on linux in my fstab, but i cannot get RW permission as a normal user. Logging as root works fine :confused: .

Here is the line in my fstab:
//server/share /mnt/share smbfs auto,rw,username=guest,password= 0 0


I have also tried adding umask=000 but doesn't change anything :(

Note: I'm using Redhat9

miaviator278 12-24-2003 05:14 PM

try adding uid=(your user id),gid=(your group id)
you can find them in your passwd file..

Glitch010101 12-21-2004 09:34 AM

gid=xxx,uid=xxx, setting directory permissions worked
 
I've done a lot of reading on this over the past day to get this working. It seems that there are two common problems keeping this from working for most people.

1.) directory permissions:

The user you want to have rw access to your smaba mount needs to have rw access to your mount point.

First, unmount the smb share. You cannot change the permissions of a mount point while a share is mounted to it.

You can either change the directory permissions by opening up the mount point to everyone
Code:

chmod 777 /mnt/yourMountHere
or by changing the group of the mount point to a group that your user is in.
Code:

chgrp yourUser /mnt/yourMountHere
then
Code:

chmod g+rwx /mnt/yourMountHere
Test this by changing to the user you want to write to the share as, then cd to the mount point (whille still unmounted) and try to create a file. You should now be able to, showing that your permissions on the linux side of things are OK.

2.) uid and gid settings:
Now you need to be sure that your fstab has the correct settings to allow that user to read and write to the mounted dir.

Here's my fstab entry

Code:

//serversus/Albums        /mnt/albums    smbfs  username=administrator,password=xxxxxxxxxx,uid=500,gid=500 0 0
Where the uid and gid pertain to the user and group I want to have access to the share. You can see your uid and gid for each user with the command
Code:

id yourUsername

FiveFlat 12-21-2004 09:53 AM

as root you need to:
#chmod u+s /usr/bin/smbmnt
#chmod u+s /usr/bin/smbumount

then as the USER create your folder you want to mount your XP share to.

Now you can mount your WindowsXP share like this:

$smbmount //WindowsXPbox/shared_folder /the/directory/you/created -o username=(your windows username)

It will then prompt you for your password - and again - it's your windows username password.

FiveFlat 12-21-2004 09:54 AM

do not chmod u+s smbmount.

zpcanada 08-31-2006 12:23 AM

I can not do it using cifs file system
 
I followed the steps but still can not write to the mounted windows shared folder. I used cifs when mounting.

Glitch010101 08-31-2006 07:04 AM

Wow - I haven't thought about this problem in a while!

This turned out to be a combination of a few issues.

Try this first:
http://www.glitchnyc.com/static/tech...nnelFix.phblox

And if that fails, give this a shot:
http://www.glitchnyc.com/static/tech...ication.phblox

Hope that helps you!


All times are GMT -5. The time now is 03:37 AM.