1

centos

I'm able to do this

$ mkdir /mnt/jenkins_master
$ mount /dev/xvdf /mnt/jenkins_master

However, the mounted files have the wrong user:group and doing the following takes a loonnnnggg time

$ chown -R jenkins:jenkins /mnt/jenkins_master

So I'm trying this instead, and getting the subsequent error

$ mount -o umask=0022,gid=jenkins,uid=jenkins /dev/xvdf /mnt/jenkins_master
mount: /mnt/jenkins_master: wrong fs type, bad option, bad superblock on /dev/nvme1n1, missing codepage or helper program, or other error.

The volume is ext4 and adding the mount -t ext4 ... option does not help.

What's the fix?

Chris F
  • 113
  • 5
  • 1
    I think `gid=` and `uid=` are not valid mount options for ext4. See [this](https://unix.stackexchange.com/q/158678/108618) maybe (and [this](https://superuser.com/a/1242432/432690)). – Kamil Maciorowski Nov 08 '20 at 22:34
  • I have a CentOS (AWS-optimized) image, and `bindfs` is not loaded. Interestingly enough, `yum install bindfs` says it cannot find the package. – Chris F Nov 08 '20 at 22:44

1 Answers1

2

These options are not available for ext* filesystems. Check the man page for mount(8). these options are only valid with filesystems like tmpfs, fat, adfs ...

Reda Salih
  • 1,724
  • 4
  • 9
  • Thanks! So what is a safe option to convert an ext4 files system to so I can use the uid and gid options? The volume will be mounted on CentOS box – Chris F Nov 09 '20 at 20:22
  • The root file system is ext4 in the CentOS box I want to mount the volume to – Chris F Nov 09 '20 at 20:28
  • Just use the basic chown command and get your result. if you wan more speed you can try to use direclty find (find /* | xargs chown :) – Reda Salih Nov 10 '20 at 15:01
  • I am doing the `chown` command, but like I said, it takes a looonnnnng time. I want to change ownership of the WHOLE directory tree, hence my post. – Chris F Nov 10 '20 at 15:55