• CONTEST ALERT - Experience the power of DDR5 memory with Kingston Click for details

Folder permissions in Ubuntu

Status
Not open for further replies.

djmykey

Let the music play.....
Ok, so guys I did install Ubuntu 6.06 atlast. So now I have some problems. (No no not some dependencies problem, thank synaptic)

I have mounted my windows hard drives, i.e. all the hdd's that are partitioned as NTFS, by editing the fstab file. Now does the problem start. I edited the fstab file thru some sudo command given on the unofficial Ubuntu guide.

So now what happens is the partitions do get mounted but I cant access them coz I dont have the rights to do so. Ok so I'm not so dumb and hence tried to check them out and then I find out that those folders were created by root. (what they were created by me.)

So then I go figure out u can't login as root into the console (duh was this necessary)
so I find out a workaround and then login as root and then I find out that still I cant change the permissions (hey this was unexpected)

So I want to know how can I access them through my djmykey login, I dun wanna login as root eveytime.

Contents of /etc/fstab file
Code:
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
/dev/hda1       /               ext3    defaults,errors=remount-ro 0       1
/dev/hda2       none            swap    sw              0       0
/dev/hdb1       /home/djmykey/Songz     ntfs    user,ro,auto    0       0
/dev/hdc5       /home/djmykey/Toolz     ntfs    user,ro,auto    0       0
/dev/hdd1       /home/djmykey/MnP       ntfs    user,ro,auto    0       0
/dev/hdd5       /home/djmykey/Gamez     ntfs    user,ro,auto    0       0
 

Sykora

I see right through you.
To execute a command as root user from your own user account, prefix "sudo" to all your commands eg "sudo vim fstab" (or whatever editor you use).
The change that needs to be made to your fstab is this :
In the column where you have user,ro,auto , add the key "umask=022" . This gives permissions to the ntfs partitions.
 
OP
djmykey

djmykey

Let the music play.....
U dint get it. I edited the fstab using sudo. But I dont have permissions to the folders or the mount points I have created where the hdd gets mounted. i.e. /home/djmykey/Songz. So just help me figure out that.
 

mehulved

18 Till I Die............
mikey rather mount them in /media/ or /mnt/ partition, That will help to show them in Places menu.
Do you mean you want to mount them manually without using mount command as sudo? eg.
Code:
sudo mount /dev/hdc5 /home/mikey/Gamez
Also, give
Code:
 sudo mount -a
command and see if things work fine now?
If you cannot access the folders within the partitions then follow what Sykora said.
 

JGuru

Wise Old Owl
@djmykey, You should mount the Windows partitions in the '/media' directory or '/mnt'
directory.
Open the Terminal Window & login as root:
$ su -
(Enter password)
# cd /home
# chmod -R 777 /djmykey
# exit

In case you have not created a root password, here's how:
$ sudo passwd root
(Enter Password)
(Enter password)
Remember password not echoed!!Not even '*' is echoed!!
This should solve your problem.
 

mehulved

18 Till I Die............
No don't create a root password. That's a big no-no. This entices people to use root account, which is not a good practise. If you want root access to a shell rather use
Code:
sudo -s -H
So, su is also out of question.
 

JGuru

Wise Old Owl
You are right @Tech_your_future. I have seen lot of people misuse the 'root' priviledges!!
Yeah, better use 'sudo'

type:
$ sudo -s -H nautilus
 
OP
djmykey

djmykey

Let the music play.....
Guys guys thanks for all the suggestions but I'm cool with the mount points and all. The thing is I edited the fstab file with the sudo command and hence I cant access the mountpoint folders itself. If I could access those folders I can access the files in it as well so anything to help me with that.

Am attaching a screenshot of the permissions to help u ppl ring any bells.
 

~Phenom~

The No.1 Stupid
hey guys , a friend of mine yesterday reset the root password of many computers of our college , while he was logged in with another user. How is it done??? our linux teacher was completely impressed by him, may i know the trick???
The linux was Red Hat 9.
 
OP
djmykey

djmykey

Let the music play.....
Ok guys u ppl really deviated frm the subject but I found the error that I made

In the options after mentioning that the drive was an ntfs I used this

user,ro,auto

where I was supposed to use this

nls=utf8,umask=0222

that did it.

@JGuru:- This was a scary command

# chmod -R 777 /djmykey

U wanted me to change the file permissions on each and everyfile cmon dont tell me man ur good at linux man.

Anyways this topic is finished. This was created due to my laziness anyways so u ppl can lock it now.
 

praka123

left this forum longback
djmykey said:
@JGuru:- This was a scary command

# chmod -R 777 /djmykey

U wanted me to change the file permissions on each and everyfile cmon dont tell me man ur good at linux man.
Code:
[B]# chmod -R 744 /djmykey[/B]
that will do
 
Last edited:

mehulved

18 Till I Die............
That will of course do prakash but won't it open up all the files in other partition to be read, written and executed by everyone?
 

praka123

left this forum longback
yup its wrong suddenly thought of executables ;)
__________
but again 755 is the default permission system wide afaik
 
Last edited:

gary4gar

GaurishSharma.com
well there is a gui method of changing folder perimissions also.
open nautilus as root and right click on folder and select the permissions tab. now change the permissions.
 

mehulved

18 Till I Die............
gary4gar said:
well there is a gui method of changing folder perimissions also.
open nautilus as root and right click on folder and select the permissions tab. now change the permissions.
Not really needed in this case as mikey seems comfortable with CLI. And it's better to stick to CLI as the GUI method will change for different file managers, that's why people ask to stick to CLI. One CLI can have many frontends with some variations in method of operations but mostly CLI will only be done by one method and it's not at all difficult to remember such a small command.
I am sure people used to remember all the commands in days of DOS.
 
OP
djmykey

djmykey

Let the music play.....
Guys guys guys enuff of this discussion. Dont u ppl get it. I already solved the problem. U know what is the problem with this forum ppl out here really think that they know something abt a certain problem (actually they do know a lot but...) and give some advice but the advice doesnt sound in the way it must and hence lot of ppl r misled and go groping around in the dark, So ppl no offence but this thread is over. And what the hell were u ppl discussing about. U know what go and mount a ntfs partition as I did in in the first hand and use the options I did using sudo and see what it does. Inspite of giving repeated posts that the GUI of the permissions r not working u ppl still insist that it shud b done in that way. Where r ur brains. I dint expect this from u senior ppl. U can fry me off this forum but I'm not at all impressed. I told u also that I cant get anything to do, I just cudnt touch the folder permissions coz the mounting itself was wrong and u ppl without checking the mounting options went on the rant abt permissions. Anyways my hands r paining coz of the typing I did yest so I end it here. And I had pm'ed a mod to close this thread. Maybe they dint recieve it or anything but pls any mod reading this pls do close this thread.
 

mehulved

18 Till I Die............
mikey the answer has been given by Sykora in the first reply itself. As far as I can see, the solution you got and sykora suggested are the same.
 

Sykora

I see right through you.
Permissions for individual files are done after mounting, but permissions for the whole filesystem is done at the time of mount. You didn't tell linux how to mount your filesystem, so you couldn't touch anything.

And here I was, thinking that my advice in my first reply was to-the-point. Ah well.
 
Status
Not open for further replies.
Top Bottom