LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 07-24-2007, 06:39 AM   #1
hansalfredche
Member
 
Registered: Jun 2005
Posts: 445

Rep: Reputation: 31
Sharing an ext2 drive with multiple different OS's, permission problem


Hi

Feisty is causing me some troubles with an ext2 partition used to share files between different OS's (Mandriva, Ubuntu, Windows). The problem comes when trying to open a file created on one of the Linux distro using the other one. Seems not the same user is used. I've tried to add the uid=500 and uid=1000,gid=100 lines to /etc/fstab, but this causes the drive not to be mounted when Ubuntu starts up. Also, when those lines are present, no way to mount as normal user. The relevant line in /etc/fstab looks like this for now:
Quote:
/dev/sda1 /media/maxtor ext2 user,noatime 1 2
When trying to mount as:
Quote:
/dev/sda1 /media/maxtor ext2 user,noatime,uid=500,gid=500 1 2
I get:
Quote:
mount /media/maxtor/
mount: wrong fs type, bad option, bad superblock on /dev/sda1,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
Any suggestions how I can tell Ubuntu to use the same uid/gid like Mandriva? Dmesg | tail gives no usefull info.

Last edited by hansalfredche; 07-24-2007 at 06:44 AM.
 
Old 07-24-2007, 11:26 AM   #2
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,987

Rep: Reputation: 388Reputation: 388Reputation: 388Reputation: 388
With the ext2 partition mounted try running:

$ sudo chmod -R 777 /media/maxtor

That should give the world rwx permissions on every file in /media/maxtor. The important thing to remember is that the partition must be mounted when you change the permissions on the mount point for the new permissions to apply to any new files added to the partition. You may run into a problem on a different linux OS if it mounts the external drive on a different mount point name. In that case just repeat the procedure on the new OS:

$ sudo chmod -R 777 <mount point>

with the drive mounted.
 
Old 07-25-2007, 02:18 AM   #3
hansalfredche
Member
 
Registered: Jun 2005
Posts: 445

Original Poster
Rep: Reputation: 31
Thanks for your answer. Actually, I wanted to know how I could change the behaviour for files that are added. Chmod changes permissions for files already present, but not for future files.
 
Old 07-25-2007, 10:50 AM   #4
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,987

Rep: Reputation: 388Reputation: 388Reputation: 388Reputation: 388
Not true. chmod on the mount point with the partition mounted changes the permissions on all subsequent files written to that partition. If you:

# chmod 777 /mount point

every subsequent file written to that partition will have 777 perms.

Knowing this fact, the course is clear. For each OS do "chmod 777 /mountpoint", then every OS will be writing to that partition with 777 permissions. Try it; it will work. The only thing that could complicate matters is an OS that automatically resets the perms on reboot for security reasons.

Note, the above is true for all linux filesystems but not for windows filesystems(vfat, ntfs).
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
kickstart; how-to info needed for multiple instances of RH OS's and multiple unique v Joe_Wulf Linux - Server 4 06-21-2007 11:18 PM
one drive sharing 2 OS's ZingSter SUSE / openSUSE 2 04-12-2005 03:10 AM
Software related boot problem affecting multiple ext2 partitions sindi Linux - Software 0 11-28-2004 02:29 PM
Problem with Lilo.conf booting multiple OS's sanfran49 Linux - Software 2 02-11-2004 03:37 PM
Multiple OS's XxDeadlyxX Linux - Newbie 11 01-18-2003 08:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 06:56 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