LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-12-2007, 10:52 PM   #1
tomtechguy
LQ Newbie
 
Registered: Jan 2007
Distribution: Arch and Slackware
Posts: 10

Rep: Reputation: 0
Mounting images of filesystems


I have a need to mount images of file systems for different purposes. To facilitate this I have added a line in my fstab that allows me to use an symlink and a directory in my home directory (I own both the link and directory).

/home/thomasl/.image /home/thomasl/image auto noauto,loop,suid,user 0 0

Basically I set the symlink to point to the image I want to mount and then run mount on the directory. (image.reiserfs is the partition image)

ln -s image.reiserfs .image
mount image

This mounts fine except for the fact that root now owns the directory that the image is mounted on. That means that I can not write to the file like I need to. Is there something in fstab I can add to be able to own the directory? Also is there a program that would allow me to do this? Keep in mind I don't want to have to log in as root to mount and chown the directory.

Thanks,
Thomas
 
Old 01-13-2007, 07:16 AM   #2
FnordPerfect
Member
 
Registered: Dec 2006
Location: Germany
Distribution: Kubuntu (Feisty Fawn), Debian (SID)
Posts: 127

Rep: Reputation: 15
check what your uid (UserID) and gid (Group ID) is with $ id.
E.g., they are both '1000'. Then add the mount options uid=1000 and gid=1000 to fstab. Now you and your group should be the owner of the mountpoint...

Last edited by FnordPerfect; 01-13-2007 at 07:09 PM.
 
Old 01-13-2007, 11:25 PM   #3
tomtechguy
LQ Newbie
 
Registered: Jan 2007
Distribution: Arch and Slackware
Posts: 10

Original Poster
Rep: Reputation: 0
That seems to work for cdrom images, but for reiserfs I get this in the dmesg.

ReiserFS: loop0: warning: unknown mount option "uid=1000"

Ext3 doesn't seem to like it either, and I haven't tried ntfs or vfat yet.
 
Old 01-14-2007, 12:26 AM   #4
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
I think the uid and gid options only work on non-native filesystems where munging of the UIDs is necessary. If files are owned by root on the images you'll need to chown/chmod them as necessary to the proper permissions. That will stick across remounts. The only reason the uid and gid options exist is as hacks for filesystems that don't have any permissions in them (e.g. vfat) or have permission schemes incompatible with Linux's.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
mounting NTFS filesystems rw atom Linux - Newbie 5 01-25-2005 09:29 AM
changing partitions filesystems and mounting them? dr_zayus69 Linux - Hardware 7 12-28-2004 07:22 PM
problem mounting different filesystems in suse9.0 ewan_m Linux - Newbie 5 05-06-2004 03:50 AM
::mounting filesystems and autostarting programs!!:: XxAndyxX Linux - Software 3 05-14-2003 06:00 PM
Mounting filesystems jimmmac Linux - Newbie 4 01-05-2003 06:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration