View previous topic :: View next topic |
Author |
Message |
Aquiles Apprentice


Joined: 23 Feb 2007 Posts: 230 Location: Somewhere, surrounded by my circumstances.
|
Posted: Sun Aug 31, 2008 10:32 am Post subject: [SOLVED] Permissions issue. |
|
|
Hi everybody.
I've created the new directory /mnt/pen. The idea is that I will mount my pendrive (/dev/sdb1) there. So, what I would like to do is to set the permissions of /mnt/pen to be "drwxrwxr-x root:pendrive" so that all users in the group "pendrive" can read/write in the pen. I have to set this permission/ownership after mounting the device, as you all probably know. And the thing is that I get the following error when changing the ownership (with /dev/sdb1 mounted, as I say):
Quote: |
zeus mnt # chown root:pendrive /mnt/pen/
chown: changing ownership of `/mnt/pen/': Operation not permitted
|
Of course, if I change the ownership of /mnt/pen without /dev/sdb1 mounted it works fine. But what I need is to do it with sdb1 mounted. I've already done it with a couple of partitions of my hard disk that I mount on ~/downloads and ~/secure and it worked fine, so I don't know why is it that I cannot do it with /dev/sdb1.
Thanks for your help. _________________ Aquiles
Last edited by Aquiles on Mon Sep 01, 2008 2:37 pm; edited 1 time in total |
|
Back to top |
|
 |
RazielFMX l33t


Joined: 23 Apr 2005 Posts: 835 Location: NY, USA
|
Posted: Sun Aug 31, 2008 2:14 pm Post subject: |
|
|
Check out the manpage for mount. I think there is something in there that sets perms on a device mount point once it is mounted but I'm not sure. I had to use that option(s) on a previous build of gentoo. I have my /etc/fstab backed up somewhere from that build, if I find it, I'll let you know what the options were. _________________ I am not anti-systemd; I am pro-choice. If being the latter makes you feel that I am the former, then so be it. |
|
Back to top |
|
 |
Hu Administrator

Joined: 06 Mar 2007 Posts: 23552
|
Posted: Sun Aug 31, 2008 11:51 pm Post subject: |
|
|
When the pendrive is mounted, your chown affects the root directory on the pendrive. If the pendrive is formatted with a filesystem that does not understand Unix style ownership, chown may fail in the manner shown. |
|
Back to top |
|
 |
Aquiles Apprentice


Joined: 23 Feb 2007 Posts: 230 Location: Somewhere, surrounded by my circumstances.
|
Posted: Mon Sep 01, 2008 2:29 pm Post subject: |
|
|
Of course!!! Boy I didn't think of that! It is an vfat pendrive. And unfortunately I must use this filesystem.
Ok now what I will try is to set the gid and the umask in /etc/fstab and see if it behaves as expected...
Thanks for the hint. _________________ Aquiles |
|
Back to top |
|
 |
Aquiles Apprentice


Joined: 23 Feb 2007 Posts: 230 Location: Somewhere, surrounded by my circumstances.
|
Posted: Mon Sep 01, 2008 2:36 pm Post subject: |
|
|
Ok everything is working now. Thank you guy for the hints. _________________ Aquiles |
|
Back to top |
|
 |
|