LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How best to remount external drive with permissions to access it? (https://www.linuxquestions.org/questions/linux-newbie-8/how-best-to-remount-external-drive-with-permissions-to-access-it-4175529882/)

Steve175 01-03-2015 02:06 AM

How best to remount external drive with permissions to access it?
 
I am user/group 999 (Mint Cinnamon, but that shouldn't matter). I plug in my USB drive (ext4) which is assigned to user 1000, and of course get "You do not have the permissions necessary to view the contents of ..." What is the proper procedure for (temporarily) owning this drive?

Open a terminal and "sudo mount -o remount gid=999,uid=999 /dev/sdg1" or something like that??? I want to be able to write files to the drive and have them be user 1000, like all other files on the drive. (So that when it's mounted by user 1000, there isn't an access problem.)

Or do I have to create a user 1000 and login under it?

[Of course what I REALLY want under Linux is: when I plug in a USB (etc.) drive, a dialog pops up and asks me if I want to mount it, and if so, RW or RO, and whether to run file manager. It would mount it to my user #, but write files under the drives user #. I can dream...]

Thank you for your advice.

veerain 01-03-2015 02:31 AM

Better you create user: 1000 and group: 1000

add your user to 1000 group id.

Or you can remount them as root. For more info see man page of mount command.

Code:

man mount

jefro 01-03-2015 12:39 PM

Might be a few things going on. User 1000 ought to be the first normal user created on system. Are you that person? As to why you are 999 I can't say.

When you unplug the usb and then plug it back in, does it automount like it should to your user ?

Habitual 01-03-2015 04:05 PM

http://forum.linuxmint.com/viewtopic.php?f=49&t=183506

Steve175 01-04-2015 10:58 AM

None of these really worked. I did make a list of about 20 steps which sort-of work (run terminal, sudo su, adduser, add user to sudoers, exit, logoff, login new user, back to terminal, change mount point from /media/mint/ to current group, etc...)

I believe the fundamental problem is that the ext filesystem keeps track of owners/users. This is a very bad idea for filesystems. If I just used FAT, I believe this would avoid all problems. FAT is too limited, however.

The short answer solution is: Run terminal, then "gksudo nemo". Fix the file user/group numbers when you come to that problem.

Habitual 01-04-2015 11:11 AM

Quote:

Originally Posted by Steve175 (Post 5294562)
I am user/group 999

How did you come to this conclusion?

JeremyBoden 01-04-2015 11:32 AM

Do you have a user with an id of 1000?

You could try using that - if you don't have one, you could consider creating one.
It is fairly quick to change ownership of all 999:999 files to 1000:1000

John VV 01-04-2015 12:14 PM

if you use a fat file system for things like a /home partition
the os should stop it from booting
( for security reasons)


and WHY a 999 uuid
debian systems START!!!! at 1000 and GO UP!!!!
1001
1002
1003
1004
1005

Redhat uses 500 ( ROOT!!! )
and 501 for the first NON root user
then 502 ,503

they do NOT GO DOWN


All times are GMT -5. The time now is 04:25 PM.