opvask Posted June 24, 2007 Report Share Posted June 24, 2007 (edited) This may be somewhat of a simple newbie-ish problem, but I reckon you guys have an easy solution. I use 3 different Linux distros (mandriva, PcLinuxOS and (K)ubuntu at the moment). For all 3 distro's I use a big storage partition. When I boot into another Linux distro I sometimes lose Write access to the drive and then I use "chown -R username:username /media/diskname" to regain write permission. I use the same username for all 3 OS, but the userID's differ. How can I make this partition available with RW access, for the (same) user in all 3 distro's? Edited June 24, 2007 by opvask Quote Link to comment Share on other sites More sharing options...
scarecrow Posted June 24, 2007 Report Share Posted June 24, 2007 Create a new group, alter its ID to all 3 OS'es to desirable, add your user(s) to that group and then change the partition permissions regarding that group. I do not think you can have FULL partition ownership in all 3 OS'es without changing thinks every time (maybe some startup script?) but I believe the group solution is sufficient for 99.5% of the operations you wanna do on that partition. Quote Link to comment Share on other sites More sharing options...
opvask Posted June 24, 2007 Author Report Share Posted June 24, 2007 I'll have a look at your suggestion. I use the same username/password for all 3 distro's (in Mandriva the UID is 500 but in Ubuntu it's 1000, I think). So it's possible to create a group with the user from all 3 distro's? I'll give it a go. Quote Link to comment Share on other sites More sharing options...
scarecrow Posted June 24, 2007 Report Share Posted June 24, 2007 It certainly is possible. I have done it in the past to be able to use the same vmware virtual machine under 3 different OS'es (Arch, Sidux, PCLinuxOS... actually four, but the fourth does not count- it was Windows XP... :P ) without any permission issues: Created a group "vmware" with the same ID in all, and changed /media/vmware permissions (which actually was a separate partition, and it still is) to root/vmware, with group having RW permissions. Then I simply added scarecrow to the vmware group, logged out and then back in, and everything was working as expected... Quote Link to comment Share on other sites More sharing options...
polemicz Posted June 25, 2007 Report Share Posted June 25, 2007 The problem is that not all distributions use the same UID's for users. The way around it is to have a common user for all systems with the same UID. Debian and the Buntus start UID's at 1000, while Mandriva does not. The nmae is not the thing, the UID is. When I install I start with a default user I may never use and use the useradd command to add the other users with the UIDs I want. Quote Link to comment Share on other sites More sharing options...
pmpatrick Posted June 25, 2007 Report Share Posted June 25, 2007 How about: # chmod -R 777 <mount point> with the partition mounted. That will give the world rwx permissions on the partition. That should be OK if you are the only one on the computer. Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted June 25, 2007 Report Share Posted June 25, 2007 The other real easy way is to make sure your user has the same uid and gid. This is why you are having problems. One user in one distro has uid 500 and gid 500 for example, and the other has 1000 and 1000. Because they are different, you lose access. Use the command line "usermod" command to edit your user and make sure they are the same. usermod -u 1000 -g 1000 username replace username with your username. Then chmod one last time and forget about doing anything else again as it will be fine. Any new distro you install, you will have to make sure the users have the same uid/gid. Quote Link to comment Share on other sites More sharing options...
opvask Posted June 25, 2007 Author Report Share Posted June 25, 2007 (edited) Thanks guys. I needed some info one the UID thing and I got it. I already considered the chmod -R 777 thing. I wasn't sure about the number though. This could be a solution, because I am the only one using this computer. At first I'll try what ianw1974 is suggesting. I think this is the exact solution I was looking for. :D Edited June 25, 2007 by opvask Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted June 26, 2007 Report Share Posted June 26, 2007 Just do: cat /etc/passwd in each distro to find out what the uid/gid is for each user. Then change and match accordingly, but check that the uid you want to allocate isn't used already. Quote Link to comment Share on other sites More sharing options...
opvask Posted June 27, 2007 Author Report Share Posted June 27, 2007 Thanks ianw1974. I haven't tried it yet, because I removed Kubuntu/Ubuntu. I Hardly ever used it anymore. BUT, I'll be needing/using your tips regarding this, in the future. That's for sure. :D Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted June 28, 2007 Report Share Posted June 28, 2007 OK, I'll mark this as solved for now then :P Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.