LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-11-2017, 05:58 PM   #1
mfoley
Senior Member
 
Registered: Oct 2008
Posts: 1,167

Rep: Reputation: 106Reputation: 106
Unrecognized mount option "uid=1002" or missing value


I'm trying to mount an external USB drive:
Code:
# mount -t ext4 /dev/sdc1 /mnt/OHPRSbackup -o uid=ohprs,gid=ohprs,flush
mount: wrong fs type, bad option, bad superblock on /dev/sdc1,
       missing codepage or helper program, or other error

       In some cases useful info is found in syslog - try
       dmesg | tail or so.
syslog has:
Code:
Aug 11 17:52:39 bu6500 kernel: [3563338.712562] EXT4-fs (sdc1): Unrecognized mount option "uid=1002" or missing value
But, that seems to be a legit option in man mount. Also, this has worked in the past. The only different is that now the file system is ext4 and before it was ntfs.

The uid is correct for user ohprs.


What am I doing wrong?
 
Old 08-11-2017, 06:07 PM   #2
55020
Senior Member
 
Registered: Sep 2009
Location: Yorks. W.R. 167397
Distribution: Slackware
Posts: 1,136
Blog Entries: 4

Rep: Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565
Quote:
Originally Posted by mfoley View Post
What am I doing wrong?
Reading the manpage.

For all filesystem types, you can use the options described under "FILESYSTEM-INDEPENDENT MOUNT OPTIONS". These include 'group' and 'user', but not 'uid' and 'gid'.

For ext4, you can also use the options described under "Mount options for ext4". No 'uid' and 'gid' there.

For ntfs, 'uid' and 'gid' do exist, but have semantics that differ from 'group' and 'user'.

Edit: You're not going to have much joy with 'flush', either, which applies only to fat filesystems.

Last edited by 55020; 08-11-2017 at 06:16 PM. Reason: and I misread 'ntfs' :(
 
2 members found this post helpful.
Old 08-12-2017, 12:13 PM   #3
mfoley
Senior Member
 
Registered: Oct 2008
Posts: 1,167

Original Poster
Rep: Reputation: 106Reputation: 106
Ah! You are right! The "ntfs options" bit on the man page had scrolled off my screen, so I didn't realize uid was applied to it and not ext4. I'm using:
Code:
mount -t -ext4 /dev/sdc1 /mnt/OHPRSbackup -o user=ohprs,rw
and that works fine ... for one drive. Still having issues.

I have an identical drive for which I'm trying to do the same thing on the same computer, but it's not working:
Code:
# mount -t ext4 /dev/sdd1 /mnt/mirror/ -o user=ohprs,rw
# exit
ohprs $ touch /mnt/mirror/joe
touch: cannot touch '/mnt/mirror/joe': Permission denied

$ df
/dev/sdc1      4845160336  94744712 4506210716   3% /mnt/OHPRSbackup
/dev/sdd1      4845160336     64440 4600890988   1% /mnt/mirror

$ ls -l /mnt
drwxrwxrwx 7 root root 4096 2017-08-12 02:23 OHPRSbackup/
drwxr-xr-x 3 root root 4096 2017-08-11 17:40 mirror/

$ sudo umount /mnt/mirror
$ ls -l /mnt
drwxrwxrwx 7 root root 4096 2017-08-12 02:23 OHPRSbackup/
drwxrwxrwx 2 root root 4096 2017-02-20 23:16 mirror/
The difference is that before mounting /mnt/mirror is a+rwx, but after mounting it reverts to go-w. Yet the one that works, /mnt/OHPRSbackup stayed with a+rwx. Not sure why, maybe I set the permissions on /mnt/OHPRSbackup after mounting? I don't remember (it's running a backup at the moment so I can't umount it).

So, what do I need to do to make a mount writable by a non-root user?

Last edited by mfoley; 08-12-2017 at 12:15 PM.
 
Old 08-13-2017, 07:15 PM   #4
mfoley
Senior Member
 
Registered: Oct 2008
Posts: 1,167

Original Poster
Rep: Reputation: 106Reputation: 106
Do I need a new topic with a different title? I need an fstab entry that will permit root to mount an external USB drive that non-root users can access. Surely this has been addressed long ago, although I've not found a solution searching the Web.

Anybody?
 
Old 08-13-2017, 07:18 PM   #5
55020
Senior Member
 
Registered: Sep 2009
Location: Yorks. W.R. 167397
Distribution: Slackware
Posts: 1,136
Blog Entries: 4

Rep: Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565
You answered it yourself already -- chmod the mounted directory.
 
Old 08-14-2017, 12:45 PM   #6
mfoley
Senior Member
 
Registered: Oct 2008
Posts: 1,167

Original Poster
Rep: Reputation: 106Reputation: 106
You're right. Actually, I think my problem is not permissions. It has to do with rsync. I'll post a different thread.
 
  


Reply

Tags
mount


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
Problems with Yum: error: unrecognized db option: "usecursors" ignored. griffey Red Hat 8 04-28-2011 04:55 PM
cc1: error: unrecognized command line option "-mapcs-32" vengat Linux - Hardware 0 04-29-2008 03:18 AM
unrecognized command line option "-mapcs-32" vengat Linux - Hardware 1 04-26-2008 01:07 AM
"Shutdown" and "Restart" option missing after upgrade hansalfredche Mandriva 8 11-02-2006 08:23 AM
"ld unrecognized option '--as-needed'" aoe2bug Slackware 5 08-17-2004 06:59 PM

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

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