Setting permissions on a new partition

Rashkae ubuntu at tigershaunt.com
Tue Jun 19 04:19:46 UTC 2007


das wrote:
> On Mon, 2007-06-18 at 20:32 -0400, Ed Smits wrote:
>> I've just added a new partition to my Feisty system - I deleted an FC7
>> installation (got bored with trying to fix it<G>), formatted it to
>> reiserfs, and added it to fstab etc. After rebooting the partition is
>> there as expected, but only root can write to it. I've gone through
>> all the fstab man pages and FAQ's I can find, and none of them deal
>> with an added fixed partition and how to set permissions on it.
>>
>> >From what I can see fstab doesn't deal with permissions - what should
>> I be using instead to set them. I could, of course, create a folder in
>> the partition as root and then set the permissions for the folder as
>> needed, however I'm wondering if there isn't a way to to do it for the
>> whole partition.
>>
>>
>> ED
>>
> 
> man fstab and man mount do have it all. Ok, as it seems, what you want
> is deleting the 'default' part of the option in the fstab, and change it
> to 'noauto,user', and as you have made it Reiser, you can also add
> 'noatime'. And also the check portion to '0 0'. So, portion becomes, if
> say hdcZ is your partition:
> 
> # /dev/hdcZ
> UUID=<something>  /mnt/data  reiserfs  noauto,noatime,user  0  0
> 
> It will give the user all permissions, but, obviously, as a user you
> will have to mount it first to work on it. On my system, I give this
> access only to me. And hence I have a 'parmount' script written, which
> is run by my .bash_profile, when I log in. So, I don't have to mount it
> by issuing command, but, it is under my power, not just root. The
> 'parmount' script is nothing but the mount command that I will have to
> issue to mount it. 
> 
> 
> 

Errrr, no, that's not what you want,,, forget changing fstab at all

You mount the partition somewhere on your filesystem, as in this 
example, /mnt/data.  Once mounted, use chown to change the ownership of 
that directory (make it recursive if you want to affect all the stuff 
you've put in there as root already)

sudo chown -R username /mnt/data




More information about the ubuntu-users mailing list