 |
 |
 |
 |
| Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum. |

8th January 2012, 11:24 AM
|
 |
Registered User
|
|
Join Date: Dec 2011
Location: Panchester City
Posts: 10

|
|
|
Mounting ext4 as user
I have several partitions that mount at /media/<label> only when I access them via file manager and it works well except in the case of one partition which creates a mount point as root. The major difference between this one partition and others is that this partittion is formated as EXT4 instead of NTFS like other partitions.
Eventually, I wish to convert all hard drives to EXT4 so this is a problem for me.
Any idea about how I could setup EXT4 partitions to auto-mount as a user, not root without using fstab, like other partitions?
|

8th January 2012, 02:58 PM
|
|
Registered User
|
|
Join Date: Jul 2007
Posts: 126

|
|
|
Re: Mounting ext4 as user
...Concretely, what goes wrong?
|

8th January 2012, 03:04 PM
|
 |
Registered User
|
|
Join Date: May 2005
Location: Sonoran Desert
Posts: 2,112

|
|
|
Re: Mounting ext4 as user
Launch your file manager as root and navigate to where the partition is mounted and
change the permissions to your user and group, just as you would for any directory.
If you don't list the partition in fstab then you will have to rely on the file manager to
do the mounting, which will be under /media, and you will have to run the file manager
and select the partition before it will be accessible to other programs.
This suits the way I work, and doesn't involve fstab. I use pcmanfm but I presume
nautilus works the same way. Gnome might mount partitions automatically for you, but
I don't have Gnome to test.
|

8th January 2012, 04:05 PM
|
 |
Registered User
|
|
Join Date: Dec 2011
Location: Panchester City
Posts: 10

|
|
|
Re: Mounting ext4 as user
Hi,
@amturnip: The problem is that it is mounted as root, and not as me(chex), and I can't use it like that for everyday multimedia access
@sonoran: I'm using xfce, but the mechanism should be the same. I tried making a mount point owned by user, but then it gets mounted as $LABEL_ again, as root.
Here is my media folder for clarity:
Code:
[chex@pc1 media]$ ls -l
total 40
drwx------. 1 chex chex 12288 Dec 17 01:07 BKP_1
drwxr-xr-x. 2 chex chex 40 Jan 8 16:48 MUSIC
drwxr-xr-x. 4 root root 4096 Dec 6 21:03 MUSIC_
drwx------. 1 chex chex 24576 Dec 6 21:04 STUFZ
The /media folder was, of course, empty on boot.
The mount point "MUSIC" was created by me,
but that partition still gets mounted with root ownership as "MUSIC_" and my folder "MUSIC" is ignored.
Other partitions (NTFS) mount as me (chex) and I have no problems with them.
|

8th January 2012, 04:21 PM
|
|
Registered User
|
|
Join Date: Aug 2011
Posts: 697

|
|
|
Re: Mounting ext4 as user
Your ext4 partition probably just has its permissions set to root.
Try to change the permissions to the user of your liking (as root).
The reason that this doesn't happen with the NTFS partitions is because that Linux doesn't has a user assigned to the NTFS SSID's and just mounts them to the user that mounted the partition.
-Edit: Sonoran already addressed it.
You need to change the permission, when you mount it in a folder the contents of that folder (and permissions) just get temporarily overwritten.
Last edited by Dutchy; 8th January 2012 at 04:26 PM.
|

8th January 2012, 04:34 PM
|
 |
Registered User
|
|
Join Date: Dec 2011
Location: Panchester City
Posts: 10

|
|
|
Re: Mounting ext4 as user
Quote:
Originally Posted by Dutchy
Your ext4 partition probably just has its permissions set to root.
Try to change the permissions to the user of your liking (as root).
The reason that this doesn't happen with the NTFS partitions is because that Linux doesn't has a user assigned to the NTFS SSID's and just mounts them to the user that mounted the partition.
-Edit: Sonoran already addressed it.
You need to change the permission, when you mount it in a folder the contents of that folder (and permissions) just get temporarily overwritten.
|
Not sure if I understood. I should change the ownership of the block device (/dev/sdd1) to me?
Out of curiosity, I even tried that just now, and it is still root that owns the mount point.
|

8th January 2012, 11:50 PM
|
 |
Registered User
|
|
Join Date: May 2005
Location: Sonoran Desert
Posts: 2,112

|
|
|
Re: Mounting ext4 as user
As root, after Music has been mounted under /media, change the ownership of the
mounted /media/Music directory to chex, either with a file manager or chown.
Everything in /dev is owned by root, even Music after it has been mounted, and you
shouldn't change that.
And you won't be able to mount the partition Music using the mount command in
a terminal unless you have an entry for it in fstab specifying "user" permission to
do so.
But you should be able to mount and access /media/Music from your file manager
if you own the partition.
==============================================
Correction: In Arch, anyway, I own /dev/tty1 where qingy and X and everything else
is running. Everything in /dev/disks is owned by root, even my data partitions Music and
Movies, which are mounted on /media and owned by me.
Last edited by sonoran; 9th January 2012 at 01:02 AM.
|

9th January 2012, 07:03 PM
|
 |
Registered User
|
|
Join Date: Dec 2011
Location: Panchester City
Posts: 10

|
|
|
Re: Mounting ext4 as user
Thanks for the answers,
Quote:
Originally Posted by sonoran
As root, after Music has been mounted under /media, change the ownership of the
mounted /media/Music directory to chex, either with a file manager or chown..
|
This works, but it means that I should always do a chown on the mount point after an automount, and only for the ext4 partition.
Quote:
Originally Posted by sonoran
Everything in /dev/disks is owned by root, even my data partitions Music and
Movies, which are mounted on /media and owned by me.
|
It is exactly like that in my Fedora installation except for that one ext4 partition.
Other (NTFS) partitions mount making me the owner of the mount point (as seen in my ls output).
I tried adding it to fstab with noato and user options and making the mount point myself with me as the owner, but again, when it's automounted by the file manager, it changes the owner of the mount point to root and I still get no write permissions.
|

9th January 2012, 11:27 PM
|
 |
Registered User
|
|
Join Date: May 2005
Location: Sonoran Desert
Posts: 2,112

|
|
|
Re: Mounting ext4 as user
Try creating your mountpoint directory in /mnt instead of /media, and giving
yourself ownership, then specify that mountpoint in fstab. /media is a tempfs
now in Fedora, but directories created under /mnt will survive reboots.
I suspect the reason the filemanager mounting works for me is that I use an old version
of pcmanfm, which at some point will stop working. But until then...
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 14:11 (Saturday, 25-05-2013)
|
|
 |
 |
 |
 |
|
|