Lordanubis
Posts: 10
Joined: Mon Dec 23, 2013 8:13 pm

mounted usb - can't chgrp? Why?

Sun Mar 13, 2016 7:24 pm

- I did put this somewhere else, but I really want to know why this is happening?

I did have this working before, but after some problems with x11vnc I did decide to start over.

I have a clean new install.
then came at the point to setup a ssd using usb.
the steps

Code: Select all

sudo mkdir /data
df -h
# f.e /dev/sda1
sudo umount /dev/sda1
# format
sudo mkdosfs -F 32 -I /dev/sda1 -n “PROTON"
# mount
sudo mount /dev/sda1 /data
# also tried -- sudo mount -t vfat -o rw /dev/sda1 /data
# and          -- sudo mount -t vfat -o uid=pi,gid=pi /dev/sda1 /data
# and this also not -- sudo mount  -t vfat -o remount,rw,uid=pi,gid=users /dev/sda1 /data
# set folder group privileges
sudo chgrp -R users /data
result
#fdisk -l
Device Boot Start End Sectors Size Id Type
/dev/sda1 2 1875385003 1875385002 894.3G b W95 FAT32
# strange the last time I got above 930G

# before mount
4 drwxr-xr-x 2 root root 4096 Mar 12 08:25 data
# after mount
32 drwx------ 2 pi pi 32768 Jan 1 1970 data
pi@Atomica:/ $ sudo chgrp -R users /data
chgrp: changing group of ‘/data’: Operation not permitted

pi@Atomica:/ $ sudo chown pi:users /data
chown: changing ownership of ‘/data’: Operation not permitted

pi@Atomica:/ $ sudo chmod -R g+w /data
pi@Atomica:/ $ ls -als
32 drwx------ 2 pi pi 32768 Jan 1 1970 data
those are the same exact steps that I did before, and it did works all the time.
I can mkdir in /data or add data

Then after a few times unmount (umount) and mount AS root with passw,
# i have at least the date right
32 drwx------ 3 pi pi 32768 Mar 12 08:34 data
#but still the chgrp isn't working
pi@Atomica:/ $ sudo chgrp -R users /data
chgrp: changing group of ‘/data/mysql’: Operation not permitted
chgrp: changing group of ‘/data’: Operation not permitted
pi@Atomica:/ $ sudo chown pi:users /data
chown: changing ownership of ‘/data’: Operation not permitted
# mount -l gives
/dev/sda1 on /data type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro) [PROTON]
So, a little confused, is it possible that I have problems because root has his new passw?
I didn't set this in my previous setup.
Can I set the root password safely back to his original state?


any suggestion about why is welcome.
thank you

DirkS
Posts: 10369
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: mounted usb - can't chgrp? Why?

Sun Mar 13, 2016 7:27 pm

Lordanubis wrote:- I did put this somewhere else, but I really want to know why this is happening?
Posting a duplicate is not the way to do it though...

fruitoftheloom
Posts: 23463
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: mounted usb - can't chgrp? Why?

Sun Mar 13, 2016 7:38 pm

Rather than negativity think outside the box !
RPi 4B 4GB (SSD Boot) RaspiOS64 ARM64
Asus ChromeBox 3 Celeron is my other computer...

User avatar
thagrol
Posts: 3136
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: mounted usb - can't chgrp? Why?

Sun Mar 13, 2016 8:00 pm

Lordanubis wrote: # mount -l gives
/dev/sda1 on /data type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro) [PROTON]
Your external drive is a windows format (vfat, most likely fat32) which does not support linux user, group, and permissions. Instead linux "fakes" these using options set at mount time and/or in /etc/fstab.

Take a look at the fat section of

Code: Select all

man mount
Arguing with strangers on the internet since 1993.

Return to “Advanced users”