I have a new disk with one btrfs partition on it and want to mount it via fstab. The problem is, that all files are now owned by root but I want them to be owned by the user with ID 1000 (and group ID 1000).With the ntfs partition on my old disk the entry looked like this:UUID=AAAE86DAAE869E87 /media/disk ntfs auto,uid=1000,gid=1000,errors=remount-ro 0My current btrfs entry looks like this:UUID=eaadb7d0-4dba-46a7-85ac-0fbf81821840 /media/disk btrfs defaults 0 1I can't set the uid and gid option on btrfs, because when I do it, I'll get an error while booting (the options uid and gid do not exist).Is there an opportunity to set the ownership of all files to a specific user?Regards,Hauke
Ownership of btrfs partition via fstab
linux;filesystems;mount;fstab;btrfs
It sounds like you're thinking that uid and gid options in fstab are a generic way to override ownership on a filesystem.  That's not really true.  The NTFS driver, specifically, supports those options because NTFS doesn't store (Linux-compatible) ownership information on disk, so the driver has to fake them.Btrfs, on the other hand, natively supports Linux file ownership, so there's no need for the driver to fake it; the btrfs driver has no uid or gid options.  If you want to change who owns something on a btrfs filesystem, just use the chown command.If you want the entire filesystem to be owned by a specific user, mount it and then chown the mountpoint directory.  That sets the owner of the filesystem's root directory, so the user can create files there.  (And the files created by that user will, of course, be owned by that user.)