~alpine/users

3 3

vfat mount uid/gid not working

Andrew Konstantinov <andrew@aklive.net>
Details
Message ID
<CAJrR3RvzmOpA90SouTQYHn_c6x7uY0b1WGOUJ_wR6cTvQSDoKg@mail.gmail.com>
DKIM signature
missing
Download raw message
All,

Puzzled as to why this is not working (what am I missing)? Appreciate any
help or pointers!

Andrew

$ uname -a
Linux localhost 5.4.5-0-lts #1-Alpine SMP Thu, 19 Dec 2019 09:08:46 UTC
x86_64 Linux
$ cat /etc/alpine-release
3.11.0
$ sudo fdisk /dev/sda
The number of cylinders for this disk is set to 30282.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p
Disk /dev/sda: 233 GB, 250059350016 bytes, 488397168 sectors
30282 cylinders, 256 heads, 63 sectors/track
Units: sectors of 1 * 512 = 512 bytes

Device  Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size
Id Type
/dev/sda1    0,1,2       1023,255,63         64  488397167  488397104  232G
 b Win95 FAT32

$ sudo mount -t /dev/sda1 /mnt/content -o rw,uid=1000,gid=1000
$ sudo mount -v G content
/dev/sda1 on /mnt/content type vfat
(rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=utf8,shortname=mixed,errors=remount-ro)
$ ls -la /mnt/content
total 100
drwxr-xr-x    4 root     root         32768 Dec 31  1969 .
drwxr-xr-x    3 root     root          4096 Dec 21 19:04 ..
$
Christian Kujau <lists@nerdbynature.de>
Details
Message ID
<alpine.DEB.2.21.99999.375.1912221914020.21037@trent.utfs.org>
In-Reply-To
<CAJrR3RvzmOpA90SouTQYHn_c6x7uY0b1WGOUJ_wR6cTvQSDoKg@mail.gmail.com> (view parent)
DKIM signature
missing
Download raw message
On Sun, 22 Dec 2019, Andrew Konstantinov wrote:
> $ sudo mount -t /dev/sda1 /mnt/content -o rw,uid=1000,gid=1000
> $ sudo mount -v G content
> /dev/sda1 on /mnt/content type vfat
> (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=utf8,shortname=mixed,errors=remount-ro)

Cannot reproduce on 5.4.5-0-virt (Alpine 3.12_alpha20191219), but 
something is curious about your mount commands: why specify "-t" but not 
fstype? What is "mount -v G..." supposed to do? Did you mean "... | grep 
conent"?

==============================================================
$ mkfs.vfat /dev/loop0
$ mount -t vfat -o uid=1000,gid=1000 /dev/loop0 /mnt/
$ mount | grep /mnt
/dev/loop0 on /mnt type vfat (rw,relatime,uid=1000,gid=1000,fmask=0066,dmask=0066,codepage=437,iocharset=utf8,shortname=mixed,errors=remount-ro)
$ ls -ld /mnt/                                                                                                                                                                                  
drwx--x--x    2 dummy    dummy          512 Dec 31  1969 /mnt/
==============================================================

Anything interesting in dmesg? Also, out of curiosity: why do you want to 
set uid/gid on a FAT filesystem?

C.
-- 
BOFH excuse #67:

descramble code needed from software company
PICCORO McKAY Lenz <mckaygerhard@gmail.com>
Details
Message ID
<CALci+FRCorD20tjczPuYHRZXbTP+BKfz3Bsqm+-KEodXOPLmQA@mail.gmail.com>
In-Reply-To
<CAJrR3RvzmOpA90SouTQYHn_c6x7uY0b1WGOUJ_wR6cTvQSDoKg@mail.gmail.com> (view parent)
DKIM signature
missing
Download raw message
men! this it's not windo like! do not use that stupid thing named sudo ok!
that's the firts problem

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/fs/fat/Kconfig

those are the default for fs in kernel fat related mounts

Lenz McKAY Gerardo (PICCORO)
http://qgqlochekone.blogspot.com


El dom., 22 de dic. de 2019 a la(s) 12:04, Andrew Konstantinov (
andrew@aklive.net) escribió:

> All,
>
> Puzzled as to why this is not working (what am I missing)? Appreciate any
> help or pointers!
>
> Andrew
>
> $ uname -a
> Linux localhost 5.4.5-0-lts #1-Alpine SMP Thu, 19 Dec 2019 09:08:46 UTC
> x86_64 Linux
> $ cat /etc/alpine-release
> 3.11.0
> $ sudo fdisk /dev/sda
> The number of cylinders for this disk is set to 30282.
> There is nothing wrong with that, but this is larger than 1024,
> and could in certain setups cause problems with:
> 1) software that runs at boot time (e.g., old versions of LILO)
> 2) booting and partitioning software from other OSs
>    (e.g., DOS FDISK, OS/2 FDISK)
>
> Command (m for help): p
> Disk /dev/sda: 233 GB, 250059350016 bytes, 488397168 sectors
> 30282 cylinders, 256 heads, 63 sectors/track
> Units: sectors of 1 * 512 = 512 bytes
>
> Device  Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors
>  Size Id Type
> /dev/sda1    0,1,2       1023,255,63         64  488397167  488397104
>  232G  b Win95 FAT32
>
> $ sudo mount -t /dev/sda1 /mnt/content -o rw,uid=1000,gid=1000
> $ sudo mount -v G content
> /dev/sda1 on /mnt/content type vfat
> (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=utf8,shortname=mixed,errors=remount-ro)
> $ ls -la /mnt/content
> total 100
> drwxr-xr-x    4 root     root         32768 Dec 31  1969 .
> drwxr-xr-x    3 root     root          4096 Dec 21 19:04 ..
> $
>
Details
Message ID
<20191223115435.2eday7534s5vjj47@wolfsden.cz>
In-Reply-To
<CAJrR3RvzmOpA90SouTQYHn_c6x7uY0b1WGOUJ_wR6cTvQSDoKg@mail.gmail.com> (view parent)
DKIM signature
missing
Download raw message
Hi,

On 2019-12-22 08:04:07 -0800, Andrew Konstantinov wrote:

> [..]
> 
> $ sudo mount -t /dev/sda1 /mnt/content -o rw,uid=1000,gid=1000
> $ sudo mount -v G content
> /dev/sda1 on /mnt/content type vfat
> (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=utf8,shortname=mixed,errors=remount-ro)
>
> [..]

Why is the `-t` there in the mount? Can you please post your /etc/fstab?

W.

-- 
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
Reply to thread Export thread (mbox)