LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-31-2020, 12:22 PM   #1
anon026
Member
 
Registered: Jan 2018
Posts: 33

Rep: Reputation: Disabled
formatted external drive but has only root access


Hello :-)

Having an issue with external drive access, and would be very grateful for advice.

Couldn't remove some trash on an external, after looking online probably because had emptied main trash/unable to restore then delete properly? Decided to format the external to ext4, as was smallest, and had done others, without the following issues, quite a while ago. Gparted required root, and now the external drive only has root access.

Tried everything, looking online at loads of things ... chmod, chown, umount (worked) but then couldn't do chmod/said no such file or directory. Tried more gparted, format, mount, etc. Then saw something about ntsfix ... keeps saying it's worked, but external drive not visible in caja, yet gparted shows it's there, either with root access only or as unknown, depending on whatever faff I'd just tried. Spacefm error along the way showed error about not being a mountable system. Tried sudo mkfs.ext4 and sudo mount, but still nothing. sudo nano /etc/fstab shows no signs of the external.

Just going in circles, and getting nowhere. No idea if this mess would happen for any new external drive in the future also, or if the issue is only this drive.

Thank you
 
Old 03-31-2020, 01:12 PM   #2
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,479

Rep: Reputation: Disabled
It is likely just a permissions problem, you can mount it as a user if you add that parameter to the mount line in your /etc/fstab file, make sure that the directory you mount it to is owned by you as well.
 
2 members found this post helpful.
Old 03-31-2020, 01:39 PM   #3
remmilou
Member
 
Registered: Mar 2010
Location: Amsterdam
Distribution: MX Linux (21)/ XFCE
Posts: 211

Rep: Reputation: 69
Mount.
Become root (su - or sudo)
chown -R youruser:youruser /path/to/mountpoint
Or: chmod -R 777 /path/to/mountpoint

Does not work on NTFS or FAT. Only on Linux filesystems
 
1 members found this post helpful.
Old 03-31-2020, 01:42 PM   #4
sevendogsbsd
Senior Member
 
Registered: Sep 2017
Distribution: FreeBSD
Posts: 2,252

Rep: Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011
Never set perms to 777 in this situation, this is not a good idea. In the windows world, people set perms to "everyone" when they can't figure out how to make something work. Not the way to do this in Linux.

Better would be 0750.
 
2 members found this post helpful.
Old 03-31-2020, 02:50 PM   #5
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by remmilou View Post
Become root (su - or sudo)
Mount.
chown -R youruser:youruser /path/to/mountpoint
FTFY
 
2 members found this post helpful.
Old 03-31-2020, 03:56 PM   #6
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
all partitioning and formatting is of root user, therefore root gets permissions added onto them, then you have to change the permissions to allow other than root to access the partitions, this is not true with ntfs formatting.
 
1 members found this post helpful.
Old 04-01-2020, 01:34 AM   #7
remmilou
Member
 
Registered: Mar 2010
Location: Amsterdam
Distribution: MX Linux (21)/ XFCE
Posts: 211

Rep: Reputation: 69
Quote:
Originally Posted by sevendogsbsd View Post
Never set perms to 777 in this situation, this is not a good idea. In the windows world, people set perms to "everyone" when they can't figure out how to make something work. Not the way to do this in Linux.

Better would be 0750.
You are absolutely right!
This was only "quick and dirty".
And admitted: After a year everybody sees it was dirty and no on remembers it was quick...

Last edited by remmilou; 04-01-2020 at 01:37 AM.
 
Old 04-01-2020, 02:06 AM   #8
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by remmilou View Post
This was only "quick and dirty".
And dangerous - it's this sort of stuff that makes malware work.
 
Old 04-01-2020, 12:34 PM   #9
anon026
Member
 
Registered: Jan 2018
Posts: 33

Original Poster
Rep: Reputation: Disabled
Hello :-)
Sorry for delay in replying; no notifications. Thank you for responses; really appreciate. I've tried the things below:

reformatted again as ext4, to be doubly sure

sudo chmod -R 0750 /run/media/wellspring/Passport
still blinking light/only root access [doesn't normally blink non-stop]

sudo chown -R wellspring:wellspring /run/media/wellspring/Passport
chown: invalid group: ‘wellspring:wellspring’

└─sdb1 8:17 0 1.8T 0 part /run/media/wellspring/Passport

Unfortunately trying to format it as ntfs isn't any different, except that the drive isn't blinking. Really would prefer ext4/proper linux format, but just trying to see if anything will format this drive as not just root access.

Sorry, I should have said it's a 2tb WD My Passport Ultra, and have had it I think over 18 months+.

Last edited by anon026; 04-01-2020 at 12:53 PM.
 
Old 04-01-2020, 01:02 PM   #10
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Code:
id
to get your user and primary group
ie
Code:
$ id
uid=1000(userx) gid=100(users) groups=100(users),7(lp),10(wheel),11(floppy),17(audio),18(video),19(cdrom),71(input),83(plugdev),84(power),86(netdev),93(scanner)
would then be
userx:users
or cat /etc/group to check for groups and spellings
 
1 members found this post helpful.
Old 04-01-2020, 01:06 PM   #11
anon026
Member
 
Registered: Jan 2018
Posts: 33

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by BW-userx View Post
Code:
id
to get your user and primary group
ie
Code:
$ id
uid=1000(userx) gid=100(users) groups=100(users),7(lp),10(wheel),11(floppy),17(audio),18(video),19(cdrom),71(input),83(plugdev),84(power),86(netdev),93(scanner)
would then be
userx:users
or cat /etc/group to check for groups and spellings
Thank you for further advice; will make a note to learn about that. I was just coming back to the thread to report that I tried formatting the drive to FAT32 and it's actually working! :-)
 
Old 04-01-2020, 01:27 PM   #12
sevendogsbsd
Senior Member
 
Registered: Sep 2017
Distribution: FreeBSD
Posts: 2,252

Rep: Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011
So, FYI: FAT and FAT32 file systems do not have the concept of permissions. If that file system is fine for you then good, but if you need ext4, you will need to set permissions on the drive.
 
1 members found this post helpful.
Old 04-01-2020, 01:42 PM   #13
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
its fat? Now I get informed.

Windows formate types do not have linux permissions, you should be able to just read/write to them.
they will NOT run a Linux executable on them either. they are Windows, not Linux.

Last edited by BW-userx; 04-01-2020 at 01:44 PM.
 
1 members found this post helpful.
Old 04-01-2020, 03:22 PM   #14
anon026
Member
 
Registered: Jan 2018
Posts: 33

Original Poster
Rep: Reputation: Disabled
Thank you very much for further replies. I'd tried to format it to fat32 after happening to see a video thumbnail today that said fat32 covers all platforms. Was surprised it worked, after all attempts at ext4 and ntfs etc. Previously formatting drives to ext4 didn't block normal access, so hitting whatever has changed hasn't been pleasant. Am fully linux, no dual boot, etc, but will need to settle for fat32 for this drive. Will be sure to remember about executables.
 
Old 04-01-2020, 03:27 PM   #15
sevendogsbsd
Senior Member
 
Registered: Sep 2017
Distribution: FreeBSD
Posts: 2,252

Rep: Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011
If you are only going to access this drive from Linux, ext4 is a better choice, but if you MAY access it from Windows or Mac, then FAT32 is a better choice. NTFS is a bad choice all around, unless it is only accessed from Windows.
 
  


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
How to access and decrypt LUKS encrypted SSD that has been moved from internal drive to external USB drive Chripcikas Linux - Newbie 8 02-21-2019 07:52 AM
Can only access USB external drive when in ROOT user bytebull Mandriva 15 01-06-2007 12:02 PM
ext3 partition on external USB hard drive mounted, but only root access allowed leontini Linux - Hardware 4 02-17-2006 01:54 AM
External Hard Drive --No Access as USER only ROOT (10.1) 1kyle Mandriva 1 10-31-2004 09:09 AM
Is it possible to mount an external mac formatted firewire drive? BrianK Linux - General 1 06-03-2004 07:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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