Non-native file systems don't support Unix permissions.
The only way userid, groupid and permissions can be set is through mount options. Once mounted, the only way to modify them is to umount the storage and remount with different options. To see the mount options, run the mount command without any options and find the line for the portable media.
Code:
$ mount |grep vfat
/dev/sdb1 on /media/tf/32G-PATRIOT type vfat (rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,showexec,utf8,flush,errors=remount-ro,uhelper=udisks2)
that's for a FAT32 32G flash drive. The uid/gid are critical and must match the output from the id command. This should be automatic. If not, something isn't working normally.
Recent Ubuntu releases have included a new package system called snaps. Snaps add many more constraints, like where on the file system the package/program can access. Chromium is one of these "snap" packages and by default it can only access the user's HOME directory. If the snap package maintainer chooses, access to files under /media and /mnt can be requested. This is for higher security for high risk programs like a web browser.
https://ubuntuforums.org/showthread....2#post13923022
# Hook up snaps to access removable-media
# snapd v2.36+.
Code:
snap connect chromium:removable-media
https://snapcraft.io/docs/removable-media-interface
That's an example only for the chromium snap package. Other snaps may or may not allow the "snap connect" to removable-media. The team who creates the snap package decides which connect options are supported.
Moving on ...
Running any file manager, like nautilus, caja, thunar and others, with elevated permissions can cause all sorts of issues.
Similarly, changing permissions for directories outside of the user's HOME is a common way to break any Unix system. There isn't any script that will fix the permissions on the system files. A reinstall is almost always required, if excellent backups aren't made in advance. For any Unix-like system, backups must include user, group, permissions and ACLs. Just copying files off is not a sufficient backup.
I don't know if nautilus is a snap package or not. Check using snap list
What is my root folder? This is ambiguous. /root? /? or $HOME?
Bookmarks