LinuxQuestions.org
Review your favorite Linux distribution.
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 04-07-2011, 11:21 PM   #1
glupa4e
Member
 
Registered: Jan 2011
Posts: 321

Rep: Reputation: 7
How to edit /etc/fstab so that normal user has read/write access to ext4 partitions


Hello Guys,
I installed Slackware64 13.1. Here is how the /etc/fstab looks like after the installation:

Code:
/dev/sda2        swap             swap        defaults         0   0
/dev/sda1        /                ext4        defaults         1   1
/dev/sda5        /storage1        ext4        defaults         1   2
/dev/sda6        /storage2        ext4        defaults         1   2
#/dev/cdrom       /mnt/cdrom       auto        noauto,owner,ro  0   0
/dev/fd0         /mnt/floppy      auto        noauto,owner     0   0
devpts           /dev/pts         devpts      gid=5,mode=620   0   0
proc             /proc            proc        defaults         0   0
tmpfs            /dev/shm         tmpfs       defaults         0   0
Now I would like to mount sda5 and sda6 in a way that i will be able to have read/write permissions on them as a normal, not super user. Even if it is needed i want to mount them under /mnt directory. Should i do it and is it necessary to create the folders in advance? Also if i create /mnt/disk1 directory should i change the permissions using chmod, chown before mounting it?

I read something about UUIDs in this forum but was not unsure how to write it in fstab.

Code:
# blkid
/dev/sda1: UUID="192211df-5e0b-404b-92fd-0fac0a2c2d26" TYPE="ext4" 
/dev/sda2: UUID="fd20b10f-ad55-42e6-b5d1-e119881e63ce" TYPE="swap" 
/dev/sda5: UUID="224360e6-899c-4446-ad55-2e9d90675ae6" TYPE="ext4" 
/dev/sda6: UUID="6eadef75-df86-4c3e-8927-96bb48400b32" TYPE="ext4"
Can you please tell me how to modify my fstab? I want to be able to have read/write permissions on sda5 and sda6 as a normal user. Is possible for them to get mounted when the system is starting? How to do that then?

Thank you!
 
Old 04-07-2011, 11:49 PM   #2
bonixavier
Member
 
Registered: Sep 2010
Distribution: Slackware
Posts: 320

Rep: Reputation: 69
I don't think the solution is in fstab, but in the directory permissions. Please try running (as root)
Code:
chown glupa4e:users -R storage1
chown glupa4e:users -R storage2
Make sure to replace glupa4e with the username. After you do that, tell us how it went.

Make sure the directories exist.
 
Old 04-08-2011, 12:33 AM   #3
glupa4e
Member
 
Registered: Jan 2011
Posts: 321

Original Poster
Rep: Reputation: 7
Hi bonixavier,

i followed the recommended instructions above and it was working for me. Very easy solution.

Thank you very much! Solved.
 
  


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
[SOLVED] Write permission to every user in ext4 (fstab) the98 Linux - General 10 09-14-2010 09:23 AM
Allowing normal users read-write access to Windows partitions Aphex_Twin2 Slackware 5 05-23-2005 09:22 AM
How can I do an automated Read/Write SMB mount for a normal user? molear Linux - Newbie 1 07-01-2004 02:45 PM
FSTAB entry for normal user to access windows partition rmanocha Linux - Software 4 01-29-2004 04:33 PM
Cant read/write to second hard disk under normal user Nukem Linux - General 8 01-28-2004 07:03 AM

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

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