Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 8th January 2012, 11:24 AM
neur0's Avatar
neur0 Offline
Registered User
 
Join Date: Dec 2011
Location: Panchester City
Posts: 10
linuxfirefox
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?
Reply With Quote
  #2  
Old 8th January 2012, 02:58 PM
amturnip Offline
Registered User
 
Join Date: Jul 2007
Posts: 126
linuxfirefox
Re: Mounting ext4 as user

...Concretely, what goes wrong?
Reply With Quote
  #3  
Old 8th January 2012, 03:04 PM
sonoran's Avatar
sonoran Offline
Registered User
 
Join Date: May 2005
Location: Sonoran Desert
Posts: 2,112
linuxfirefox
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.
Reply With Quote
  #4  
Old 8th January 2012, 04:05 PM
neur0's Avatar
neur0 Offline
Registered User
 
Join Date: Dec 2011
Location: Panchester City
Posts: 10
linuxfirefox
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.
Reply With Quote
  #5  
Old 8th January 2012, 04:21 PM
Dutchy Offline
Registered User
 
Join Date: Aug 2011
Posts: 697
linuxfirefox
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.
Reply With Quote
  #6  
Old 8th January 2012, 04:34 PM
neur0's Avatar
neur0 Offline
Registered User
 
Join Date: Dec 2011
Location: Panchester City
Posts: 10
linuxfirefox
Re: Mounting ext4 as user

Quote:
Originally Posted by Dutchy View Post
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.
Reply With Quote
  #7  
Old 8th January 2012, 11:50 PM
sonoran's Avatar
sonoran Offline
Registered User
 
Join Date: May 2005
Location: Sonoran Desert
Posts: 2,112
linuxfirefox
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.
Reply With Quote
  #8  
Old 9th January 2012, 07:03 PM
neur0's Avatar
neur0 Offline
Registered User
 
Join Date: Dec 2011
Location: Panchester City
Posts: 10
linuxfirefox
Re: Mounting ext4 as user

Thanks for the answers,

Quote:
Originally Posted by sonoran View Post
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 View Post
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.
Reply With Quote
  #9  
Old 9th January 2012, 11:27 PM
sonoran's Avatar
sonoran Offline
Registered User
 
Join Date: May 2005
Location: Sonoran Desert
Posts: 2,112
linuxfirefox
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...
Reply With Quote
Reply

Tags
ext4, mounting, user

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
mounting and writing ext4 volume on different host system droolpup Using Fedora 6 13th January 2011 07:11 PM
mounting other partitions as user Tom06 Using Fedora 3 5th July 2010 01:03 PM
Mounting external ext4 scottr Hardware & Laptops 2 22nd November 2009 04:53 PM
Problems mounting an external HD, F11, ext4 phenyl Using Fedora 4 27th July 2009 06:14 AM
Mounting a CD-R as user pablos Using Fedora 0 21st March 2007 06:55 PM


Current GMT-time: 14:11 (Saturday, 25-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat