LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 05-26-2020, 03:12 AM   #1
concorde
LQ Newbie
 
Registered: Aug 2018
Location: New Zealand
Distribution: Arch / XFCE
Posts: 28

Rep: Reputation: Disabled
Fstab Mounting Not Giving Permissions - Arch


When I start up my Arch Linux with XFCE, it "randomly decides" whether or not to mount the Internal Hard Drive (separate from Linux partition) properly. It is always mounted, but often I don't have write/execute permissions on it. This has been an issue since I ever installed Arch a long time ago.

The External Hard Drive, however, always mounts properly.

Both are formatted as NTFS.

With either HD, if I want to delete something, I really have to delete it. I can't "send to Trash".

My /etc/fstab reads:

Code:
# Static information about the filesystems.
# See fstab(5) for details.

# <file system> <dir> <type> <options> <dump> <pass>
# /dev/sda3
UUID=474b56f0-b2cc-434d-8731-770f07154046       /               ext4            rw,relatime     0 1

# /dev/sda1
UUID=2B4C-5E19          /efi            vfat            rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859>

# /dev/sda2
UUID=f8ffb5a8-5542-4be8-9d03-e06226cd19eb       none            swap            defaults        0 0

# /dev/sdb1
UUID=73334F9209D268D4   /run/media/william/INTHD        ntfs-3g  defaults               0       0

# /dev/sdd1
UUID=63C001AE6540DD49   /run/media/william/EXTHD        ntfs-3g  defaults               0       0
1. Can I make it so I can "send to Trash" instead?

2. What's wrong with my permissions?
 
Old 05-26-2020, 03:35 AM   #2
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 1,758

Rep: Reputation: 311Reputation: 311Reputation: 311Reputation: 311
check out this link might give you an idea, https://superuser.com/questions/1747...an-ext4-volume

or this one: https://unix.stackexchange.com/quest...to-all-users-o

from above link:

Quote:

If the filesystem type is one that doesn't have permissions, such as FAT, you can add umask, gid and uid to the fstab options. For example:

/dev/sdb1 /media/workspace auto defaults,uid=1000,gid=1000,umask=022 0 1

uid=1000 is the user id.

gid=1000 is the group id.

umask=022 this will set permissions so that the owner has read, write, execute. Group and Others will have read and execute.

Last edited by JJJCR; 05-26-2020 at 03:35 AM. Reason: edit
 
2 members found this post helpful.
Old 05-26-2020, 04:10 AM   #3
concorde
LQ Newbie
 
Registered: Aug 2018
Location: New Zealand
Distribution: Arch / XFCE
Posts: 28

Original Poster
Rep: Reputation: Disabled
Well it's only after trying 1 restart, but it fixed the Move To Trash, and seems to have fixed the permissions.

Thank you!
 
1 members found this post helpful.
Old 05-26-2020, 06:43 AM   #4
ehartman
Senior Member
 
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 1,674

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Quote:
Originally Posted by concorde View Post
2. What's wrong with my permissions?
The problem is ntfs, as that file system doesn't have Linux-like permissions, so they depend on the mounting process (and its userID). In fact the permissions are faked by the driver (mostly ntfs-3g).

Edit: I see you're using "defaults" for the mount options in /etc/fstab.
Look at the "uid=" (with your user ID) and the "fmask=" (normal files) and "dmask=" (for directories) options in the docs for ntfs-3g.
Like "uid=<your uid>,fmask=0133,dmask=022" instead of the "defaults" clause. That should automount always mount them as "your uid" with write access for you and read access for everyone.

Last edited by ehartman; 05-26-2020 at 10:40 AM. Reason: added mount options
 
4 members found this post helpful.
Old 05-26-2020, 02:09 PM   #5
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 14,587
Blog Entries: 9

Rep: Reputation: 4081Reputation: 4081Reputation: 4081Reputation: 4081Reputation: 4081Reputation: 4081Reputation: 4081Reputation: 4081Reputation: 4081Reputation: 4081Reputation: 4081
As always with ArchLinux issues:
https://wiki.archlinux.org/index.php/NTFS-3G
A good, long read. I didn't, but I'm sure there's something in there that will give you both insight & advice.
 
1 members found this post helpful.
Old 05-26-2020, 08:54 PM   #6
concorde
LQ Newbie
 
Registered: Aug 2018
Location: New Zealand
Distribution: Arch / XFCE
Posts: 28

Original Poster
Rep: Reputation: Disabled
After another restart, the initial solution didn't work, so it was just chance.

After totally replacing "defaults" with "uid=1000,fmask=0133,dmask=022" (1000 obtained from id -u command) it still doesn't let me delete or move to Trash from either hard drive, and say when I open a document, it will say

"Document file " " is locked for editing by: Unknown User.

And it has to be open Read-Only.

No doubt it will work after another restart or two, for no apparent reason, then break again.

Last edited by concorde; 05-26-2020 at 08:56 PM.
 
Old 05-26-2020, 09:35 PM   #7
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 1,758

Rep: Reputation: 311Reputation: 311Reputation: 311Reputation: 311
Lightbulb

Quote:
Originally Posted by concorde View Post
Well it's only after trying 1 restart, but it fixed the Move To Trash, and seems to have fixed the permissions.

Thank you!

Quote:
/dev/sda8 /media/foo ntfs-3g rw,user,exec,umask=000 0 0
Try changing the umask to 000 as above.

If still doesn't work after a few reboot, you can run this:

sudo lsof /path/to/the/file

it will check which file is locking and you can try to kill the process or do further troubleshooting.
 
1 members found this post helpful.
Old 05-31-2020, 09:45 PM   #8
concorde
LQ Newbie
 
Registered: Aug 2018
Location: New Zealand
Distribution: Arch / XFCE
Posts: 28

Original Poster
Rep: Reputation: Disabled
Adding umask=000 to uid=1000,dmask=022,fmask=133 seems to have made it work consistently.

Oddly it did take 2 or 3 restarts before it started working.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
courier-imap (running on arch linux) using mailx (also on arch linux pc) 'imap error: mailbox does not exist, or is not subscribed to' lilmike Linux - Server 1 11-10-2016 02:43 AM
setfacl changes group permissions; giving another user rw permissions secretlydead Linux - Server 4 09-22-2012 11:12 PM
mounting, hal, fstab-sync and permissions sonicbuddha Linux - General 1 12-20-2005 12:38 PM
Permissions: Fstab and some other mounting questions azzurro Slackware 13 08-07-2004 09:30 PM
File/Folder Permissions / Mounting hdd's / fstab <-- ?Questions? EThitop Linux - Newbie 2 06-19-2004 08:19 PM

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

All times are GMT -5. The time now is 09:53 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration