LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-17-2019, 10:44 AM   #1
triley831
Member
 
Registered: Feb 2017
Posts: 34

Rep: Reputation: Disabled
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.
 
Old 01-17-2019, 07:07 PM   #2
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,747

Rep: Reputation: 264Reputation: 264Reputation: 264
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.
 
Old 01-18-2019, 03:55 AM   #3
fatmac
Senior Member
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Posts: 3,630

Rep: Reputation: Disabled
You need to make your USB drive 'user' mountable, (see man mount).
 
Old 01-18-2019, 06:54 AM   #4
triley831
Member
 
Registered: Feb 2017
Posts: 34

Original Poster
Rep: Reputation: Disabled
It's a requirement that drives plugged in by mil personnel have to be formatted as FAT
 
Old 01-18-2019, 07:00 AM   #5
triley831
Member
 
Registered: Feb 2017
Posts: 34

Original Poster
Rep: Reputation: Disabled
fatmac - they automount now, to /media
 
Old 01-18-2019, 01:30 PM   #6
fatmac
Senior Member
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Posts: 3,630

Rep: Reputation: Disabled
.....but with the wrong permissions(?).....or else you are not setting the mount parameters correctly in your /etc/fstab file. (See man fstab)
 
Old 01-18-2019, 01:33 PM   #7
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,570

Rep: Reputation: 2349Reputation: 2349Reputation: 2349Reputation: 2349Reputation: 2349Reputation: 2349Reputation: 2349Reputation: 2349Reputation: 2349Reputation: 2349Reputation: 2349
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.
 
Old 01-18-2019, 01:37 PM   #8
triley831
Member
 
Registered: Feb 2017
Posts: 34

Original Poster
Rep: Reputation: Disabled
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.
 
Old 01-22-2019, 09:35 AM   #9
triley831
Member
 
Registered: Feb 2017
Posts: 34

Original Poster
Rep: Reputation: Disabled
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.
 
Old 01-22-2019, 12:51 PM   #10
fatmac
Senior Member
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Posts: 3,630

Rep: Reputation: Disabled
Take a read here, that should point you in the right direction.

https://superuser.com/questions/1747...an-ext4-volume
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Why does /media/cdrecorder pop up with "cd /media/ + tab" when I have /media/usb too? SharpyWarpy Fedora 6 11-22-2012 01:05 AM
Why so many "tmpfs" mounted? One is mounted on /media -- why? SharpyWarpy Fedora 6 03-13-2012 12:15 AM
Pen drive not mounted ...."Unable to mount, No media in drive" subashk80 Linux - Newbie 6 08-17-2009 01:38 AM
How is an USB drive mounted, and how can I change the permissions jjge Ubuntu 6 04-26-2007 05:59 PM
Media, media, and oh yeah......media. Morbid SUSE / openSUSE 2 03-11-2007 08:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration