LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Permissions to mounted device (https://www.linuxquestions.org/questions/linux-newbie-8/permissions-to-mounted-device-691513/)

Catapult 12-18-2008 11:33 AM

Permissions to mounted device
 
Hi all,

I have a Lacie remote disk drive that I have mounted on our linux box. The problem I have is that only Root can write to the disk drive. I really need for our backup user to be able to write to the drive too.

I have configured fstab with the following entry:

//192.168.25.44/LinuxServer /mnt/backupdisk smbfs rw 0 0

I have tried mounting the drive with different options e.g. defaults, but I still have the same problem.

When the drive isn't mounted to the /mnt/backupdisk directory my backup user has full permissions to the directory. As soon as the drive is mounted only root user and root group have permissions.

I have tried chmoding the directory once it is mounted but this doesn't seem to do anything.

Does anyone have any light they can shed on this for me? I'd be very grateful :O)

openSauce 12-18-2008 11:43 AM

What file system is on the drive? If it's a system that doesn't support unix-like permissions (e.g. FAT or NTFS), you need to set the permissions/ownership for the whole drive at mount time.

Try setting the options field in fstab to
Code:

defaults,uid=####,gid=####
where #### is your numeric user id (can be found in /etc/passwd). This will work for local FAT/NTFS drives, not sure about smbfs.

You might also want to set the dmask and fmask values in fstab - check out man mount to see what they do.

bdox 12-18-2008 03:52 PM

Hi there!
try this out:
//192.168.25.44/LinuxServer /mnt/backupdisk smbfs umask=0,users,rw 0 0
;)

umask=0 should give the wr permissions you want. 'users' just in case ;) (see #man mount for mor detail ;)

Catapult 12-19-2008 05:07 AM

Thanks guys
 
I tried your way first bdox but it didn't work ;o(

But your's worked great openSauce!

Thanks for the help. I'm sure you'll see me back here again some time :o)

openSauce 12-19-2008 07:29 AM

Glad you got it working. I would also have expected bdox's suggestion to work: the uid and gid options set the ownership of files on the drive, whereas umask sets the permission bits (it does it in an inverted way for some reason, so umask=0 sets the permissions to 777, umask=777 would set them to 000, 022 would be 755, etc), or you can use dmask and fmask to separately set the perms for directories and regular files.

If you can do what you want to do now, you can leave things be I guess, but it might be worth looking at if you want to set the permissions rather than the ownership. Feel free to come back if you've got more questions


All times are GMT -5. The time now is 05:26 PM.