LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-05-2009, 01:33 AM   #1
timl
Member
 
Registered: Jan 2009
Location: Sydney, Australia
Distribution: Fedora,CentOS
Posts: 750

Rep: Reputation: 156Reputation: 156
2nd hdd mount point and permissions


Hi, I added a 2nd hdd to my slackware system. I formatted the drive as ext3, created a mount point /mnt/data and added the details to /etc/fstab. On reboot everything looks good. But, I can read /mnt/data but not write (without being root anyway). When I look at /mnt I see:

drwxr-xr-x 4 root root 4096 2009-09-05 16:26 data

can I simply modify the permissions to rwxrwxrwx or is there another way to write to this area from non-root accounts
 
Old 09-05-2009, 02:30 AM   #2
mlangdn
Senior Member
 
Registered: Mar 2005
Location: Kentucky
Distribution: Slackware64-current
Posts: 1,845

Rep: Reputation: 452Reputation: 452Reputation: 452Reputation: 452Reputation: 452
Try changing fstab to this, changinging the /dev to whatever your system is.

Code:
/dev/sda5        /mnt/data   ext3        noauto,usr,rw         1   1
 
Old 09-05-2009, 02:46 AM   #3
kslen
Member
 
Registered: Nov 2008
Distribution: Slackware & LMDE.
Posts: 74

Rep: Reputation: 19
The issue here is that you have mounted the partition to your mount point as root which means only root can manipulate it. Without user permissions set in fstab, users can not change the content even if you set the right permissions on the mount point itself.
With the user permissions set in fstab, you can. However, if you can dump files directly onto a mounted partition; so can others.
What I do to get around this is create a directory /mnt/data/ which has the same name as my username. This way I can share the partition with other users without revealing any of my data as they will have no access to my directory on that partition.
If you feel that navigating to /mnt/data/youruser is a hassle in order to get to your files, all you have to do is make a symbolic link to the /mnt/data/youruser in your home directory.

As a regular user, do the following:
Code:
sudo mkdir /mnt/data/myusername
sudo chown myusername:users /mnt/data/myusername
ln -s /mnt/data/myusername ~/data
If you take a look at your home directory, there should now be a symbolic link named "data" which will take you to /mnt/data/yourusername. The best part is that it will act as a regular directory inside your home directory.

Hope this helps.

Cheers.

Last edited by kslen; 09-05-2009 at 02:52 AM.
 
Old 09-05-2009, 03:29 AM   #4
z-vet
Member
 
Registered: Aug 2004
Location: Israel
Distribution: LMDE 5
Posts: 271

Rep: Reputation: 34
Just do
Code:
chown -R your_username:your_user_group /mnt/data
as root.
 
  


Reply



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
Make removable USB hdd mount at fixed mount point ctkroeker Linux - General 13 08-11-2009 08:49 AM
How to auto mount a 2nd hdd Adam555 Linux - Newbie 2 01-22-2008 02:56 AM
Set up rsync to mirror mount on Windows Server to mount point on 2nd internal drive MoMule Linux - Server 4 04-13-2007 09:34 PM
2nd HDD and permissions madman8 Slackware 9 01-04-2006 09:23 PM
How to format & mount 2nd hdd after FedCor1 has been installed on 1st hdd? clay394 Fedora 1 05-18-2004 01:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:18 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
Open Source Consulting | Domain Registration