-   Linux - Newbie (
-   -   Permissions issue on USB drive mounted to /media (

triley831 01-17-2019 10:44 AM

Permissions issue on USB drive mounted to /media
Hello, have a permissions issue I was hoping someone would know an easy way around. So here goes....

Using RedHat7.5, RedHat helped us figure out of way to mount USB drives to /media, instead of the new default - /run/media/username

So we have software that runs on a tactical system as an elevated (non-root) user. The military personnel that use this system are auto-logged in with a limited account that they don't even have password for.

So these military personnel will click on a button within our tactical software that attempts to do a simple rsync from a directory within the home directory of that elevated user to /media (the USB drive). Our tactical software auto-saves data to this folder. I'm past the problem of where the drive mounts (/media - thanks RedHat) but now get permission denied and am having trouble getting my mind wrapped around where to change permissions.

How do I allow the elevated user (recall that the tactical software runs as this user) to be able to write to /media/partition of the generic user account? When the drive mounts, I suppose that since its mounting as the generic user, that user owns that directory.

I hope this makes sense.

Thank you in advance.

kilgoretrout 01-17-2019 07:07 PM

What filesystem is on the usb drive, eg. vfat, ntfs, ext4, xfs?? On mounted partitions, you handle permissions differently for windows filesystems and linux filesystems.

fatmac 01-18-2019 03:55 AM

You need to make your USB drive 'user' mountable, (see man mount).

triley831 01-18-2019 06:54 AM

It's a requirement that drives plugged in by mil personnel have to be formatted as FAT

triley831 01-18-2019 07:00 AM

fatmac - they automount now, to /media

fatmac 01-18-2019 01:30 PM

.....but with the wrong permissions(?).....or else you are not setting the mount parameters correctly in your /etc/fstab file. (See man fstab)

273 01-18-2019 01:33 PM

Erm, ask the US Military to use the technical support from Red Hat!
Really, there is no reason to ask this here and it could, almost, be seen as a breach of security.

triley831 01-18-2019 01:37 PM

fatmac - guess I'm not understanding what you're asking.

The orginal issue that RedHat helped us with was automounting ANY usb drive out there in the world to /media. How would I configure something like that in fstab? I know I could mount a specific drive that way.

triley831 01-22-2019 09:35 AM

I've contacted RedHat again about this.

What I have to do is allow user2 (user account that runs a tactical display) to rsync data over to the USB drive mounted (now) at /media. Keep getting permission denied.

fatmac 01-22-2019 12:51 PM

Take a read here, that should point you in the right direction.

All times are GMT -5. The time now is 12:16 AM.