fstab & users

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
ashonlineAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

RobsonCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
adityabvssCommented:
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
cjl7freelance for hireCommented:
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
ashonlineAuthor Commented:
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.