?
Solved

fstab & users

Posted on 2005-03-21
4
Medium Priority
?
522 Views
Last Modified: 2010-04-20
Hi

I'm just getting back into Linux after a stint with Win2003 & I've forgotten a few things... :-(

I have the following line within my fstab file:

LABEL=/spare /spare ext3 defaults 1 2

I need to allow my user account (ashley) to have full read/write access to this partition.

Can someone please help?!

Thanks

Ashley
0
Comment
Question by:ashonline
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 4

Accepted Solution

by:
Robson earned 1000 total points
ID: 13590354
In ext2 and ext3 filesystems user permisiions are asigned to file/directory, so just set /spare ownership to ashley (chown ashley /spare).

Regards

Robson.

0
 
LVL 1

Expert Comment

by:adityabvss
ID: 13590576
Assuming root is the owner & Group owner of the partition /spare,
You have two options

1.You can change the ownership of the /spare partition to "ashley" by running the command
a.Switch to root
b.chown ashley /spare
c.chmod u+rwx /spare, if they are not set

2.For somereason you want to retain the ownership to root, adding the user "ashley" to the root group will be a bad idea. So you can create a new group "spareshare" and add the user ashley to the group. Then change the group ownership of the /spare partition to "spareshare". You can do that by the following commands.

a.Switch to root
b./usr/sbin/groupadd spareshare
c.vi /etc/group
find the line which has the groupname spareshare, it will be the lastline, then add "ashley" at the end of the line. After the modification, the line looks like this,
spareshare:x:13037:ashley
d.chown :spareshare /spare
e.chmod g+rwx /spare, if they are not set

Regards,
Aditya
0
 
LVL 14

Expert Comment

by:cjl7
ID: 13599930
Hi,

Assuming that the file permissions on the dir is correct you can add "uid=1001" (or whatever ashley has...) in your fstab to allow ashley to mount/unmount the disk.

To test from command line do mount -o rw,uid=ashley LABEL=/spare /spare

This might not be exactly what you asked, but hey... :-)

//jonas
0
 

Author Comment

by:ashonline
ID: 13600544
Thanks for the tips guys.

All I ended up doing was a "chown ashley /spare" and it has been all good since.

I haven't had to alter fstab at all (not sure if that's good or bad).
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month13 days, 3 hours left to enroll

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question