LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 04-21-2014, 12:37 AM   #1
Silver565
Member
 
Registered: Jul 2007
Distribution: Ubuntu, Windows, Freenas
Posts: 96

Rep: Reputation: 15
How do I mount a volume with specific permissions?


Hi Guys

I'm attempting to mount a second disk to my Ubuntu 13.10 virtual machine differently:
  • Mount the disk giving the user www-data:www-data full write permissions
  • Mount the volume under /media/directory rather than /media/username/directory

Can anyone point me in the right direction? I'm attempting to setup an OwnCloud server with a seperate data directory. The catch is that the www-data user needs to have full ownership of the folder(It works whenever I assign permissions to a folder on my root drive. It just doesn't work on any folder that I put onto a separate disk)

Any help would be greatly appreciated
 
Old 04-21-2014, 01:48 AM   #2
yzT!
Member
 
Registered: Jan 2013
Distribution: Debian
Posts: 168

Rep: Reputation: 2
1st: http://superuser.com/questions/32041...ic-user-rights
2nd: you can mount a volume wherever you want, you're not forced to do it at /media/username/...
 
Old 04-21-2014, 09:10 AM   #3
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 3,469

Rep: Reputation: 1522Reputation: 1522Reputation: 1522Reputation: 1522Reputation: 1522Reputation: 1522Reputation: 1522Reputation: 1522Reputation: 1522Reputation: 1522Reputation: 1522
The permissions on the mount point directory are irrelevant. What you want to set are the ownership and permissions for the root inode of the mounted filesystem. Just do that while the filesystem is mounted, and the settings will persist. This of course assumes a filesystem that supports UNIX-like ownership and permissions. For filesystems like FAT and VFAT that do not support such permissions, the owning UID and GID and the permission masks are set as mount options. See "man 8 mount" for details.
 
Old 04-21-2014, 03:29 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 16,689

Rep: Reputation: 2455Reputation: 2455Reputation: 2455Reputation: 2455Reputation: 2455Reputation: 2455Reputation: 2455Reputation: 2455Reputation: 2455Reputation: 2455Reputation: 2455
May have to set a script that also chmod's what you want to be sure after mount. (not sure of what the OP has)
 
Old 04-24-2014, 06:01 PM   #5
Silver565
Member
 
Registered: Jul 2007
Distribution: Ubuntu, Windows, Freenas
Posts: 96

Original Poster
Rep: Reputation: 15
Hi guys

thank you very much!

I've set the volume to auto mount under /mnt/OwnCloud. I then did a chown to that folder which seemed to do the trick. Editing the fstab was all I really needed to do!

Thanks again!
 
  


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
Auto login to a specific user with specific permissions if autherization failed seismael Linux - Security 11 01-28-2014 01:04 PM
LVM Mount Physical Volume/Logical Volume without a working Volume Group mpivintis Linux - Newbie 10 01-11-2014 07:02 AM
Way to make autofs mount to specific USB flash drive to specific folder? utahnix Linux - Software 2 11-24-2010 05:27 PM
how to mount SAN volume with its increased volume size prvnrk Linux - General 4 03-22-2008 10:48 AM
Making removable disks mount with specific permissions ForYouAndI.com Linux - Hardware 1 03-14-2007 08:50 PM

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

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

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