LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   mounted partition loses it's permissions (https://www.linuxquestions.org/questions/linux-software-2/mounted-partition-loses-its-permissions-419543/)

titopoquito 02-25-2006 05:25 PM

mounted partition loses it's permissions
 
SOLVED: I got it working it seems. How I did it in case anyone encounters the same problem:

I changed the permissions of the folder where I mount the partition to 1777 and the owner to root:root when it was unmounted. Not sure if this is necessary. The second step seems to make the difference: AFTER mounting the partition I once again applied permissions and ownership to the folder (= mountpoint). Now I can create more folders in there as a normal user, it seems to behave like the /tmp folder.

To complete it, my fstab entry has options set to "rw,suid,dev,exec,noauto,user,async" (same as "default", but changed auto to noauto and nouser to user) which allows me to mount it as normal user without su'ing to root.



The original post: ------------------------------

Hi,

I'm getting a little bit crazy about mounting a partition. I have created a folder as mount point but can't get a normal user to get write permission in that folder's base directory. As soon as I mount the partition it's permissions look like rwxr-xr-x and it is owned by root:root.
Basically I want something like the /tmp folder -- everyone can create directories, but read and delete only his/her own stuff.

I have an external harddrive that has the one partition I want to mount. The partition (/dev/sda1) is formatted with reiserfs and I choose as mountpoint /mnt/data-a. I tried several combinations of read/write-permissions and ownership (for example [1] root:root 777 [2] tito:users 775 [3] root:users 777) and tried to apply sticky bit once when the folder was assigned to root and once when it was owned by user tito.
In my fstab I have no special options at the moment. I played with user and users, but choose to fall back to "defaults" because my /tmp folder has the same permissions and there the permissions work like I would it to work with my data folder.

Any clues why the permissions change as soon as I mount the partition and how to get the same behaviour like the /tmp folder has? Your help is higly appreciated :confused:

TruongAn 02-27-2006 03:26 AM

I don't know what happend to you but the defaults options work fine for me

titopoquito 02-27-2006 04:07 AM

I tried the default options, but they didn't work per se. I think the solution was to change the permissions of the folder after the partition was mounted. If I use "default" as mount option now, then it's ok (but I like my only user==myself to mount the partitions himself, so I chose the "user" option).


All times are GMT -5. The time now is 02:42 PM.