Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Red Hat This forum is for the discussion of Red Hat Linux.


  Search this Thread
Old 09-02-2003, 11:16 PM   #1
LQ Newbie
Registered: Aug 2003
Location: bc canada
Distribution: red hat
Posts: 2

Rep: Reputation: 0
Question Permissions for folders

Hi. I am a Linux newbie.
It's Tuesday evening, I installed RH9 this morning. So I am very Noobie!
Just installed Wine, compiled it, now I am trying a Make Install.
But it cannot create directories in .\user\.....
Investigating further I found I don't have permissions (I tried to create the folders manually)
How do I give myself permission?
It says I am not the owner.
I want to be the owner! It's my 'puter!

Like I said, this is my first day in Linux, I was happy to ungzip? the tarball? and do the compile thingy.

I think i need to log in as an administrator or something? Am I correct? How do I do this.

Take pity on a newbie :^)

Thanks George
You can email to if its a lengthy procedure.

Thanks agian.
Old 09-02-2003, 11:20 PM   #2
LQ Newbie
Registered: Aug 2003
Distribution: RedHat 9.0
Posts: 10

Rep: Reputation: 0
ya. type: su to log in as super user.. hopefully you remember what your superuser password is .. once logged inas superuser, you will have the priveleges neccessary . u can tell by the '#' symbol now for a prompt.
Old 09-03-2003, 02:08 AM   #3
Red Hat
Registered: Sep 2003
Location: Raleigh, NC
Distribution: Red Hat Enterprise Linux v 2.1, v 3, v 4
Posts: 174

Rep: Reputation: 30
Looks like for want you need to do is login as root. You can log in as root several ways:

1) from the command line type "su -" or "su" or "su root". The notation is to use 'su username' and you can switch user's to any username you know the passwrod to. Please note there is a difference between "su -" and "su". Most of the time you want to use "su -".

2) use a virtual terminal and log in to the command line interace. On your keyboard hold down CTRL+ALT+F#, where F# is F2-F7. These are called virtual terminals. If you're logged into the graphics then you are on the first graphical console, F7. For example, hitting CTRL+ALT+F3 will take you to tty3. You can log in as root (or another user) and do whatever you need to.

Now you need to create your directory....(note to self, 'man' pages are your friend: man command. Use cd (change directory) to navigate to where you need to create your dir, then use mkdir dir_name (man mkdir for notation). You can also specify the full path using mkdir. Examples:
cd /home/newbie; mkdir newDir
- or -
mkdir /home/newbie/newDir

Your biggest question is how to change permissions. The command that does this is chmod (man chmod). First you can view the permissions using the ls command adding the -l option. (man ls)

[root@tavarua newbie]# mkdir newDir
[root@tavarua newbie]# pwd
[root@tavarua newbie]# ls -l
total 4
drwxr-xr-x 2 root root 4096 Sep 3 01:52 newDir

you can see the permissions: drwxr-xr-x
1st position d = directory, - = file, c = char device, b = block device
2nd - 4th positions: permissions for owner
5th - 6th positions: permission for group
7th - 9th positions: permission for everyone else

Permissions go like this:
r = read, value = 4
w = write, value = 2
x = execite, value = 1

You can add these values up to modify permissions. Examples:
7 = rwx, 6 = rw-, 5 = r-x, 4 = r--, etc...

Here's how I change permissions on the directory (folder) called newDir from 755 to 740:

[root@tavarua newbie]# chmod 740 newDir/
[root@tavarua newbie]# ls -l
total 4
drwxr----- 2 root root 4096 Sep 3 01:52 newDir

I just did the following, changed the permission from
owner (root) rwx (7), group (root) r-x (5), else r-x (5)
owner (root) rwx (7), group (root) r-- (4), else --- (0)

This should be enough information to get you going.
Old 09-03-2003, 02:26 AM   #4
Red Hat
Registered: Sep 2003
Location: Raleigh, NC
Distribution: Red Hat Enterprise Linux v 2.1, v 3, v 4
Posts: 174

Rep: Reputation: 30
Follow up:

You can also look into the following commands:

Another way to possibly achieve what you are trying to do is to create a new group called 'wineuser' with the groupadd command. This makes an entry in the /etc/group file and you can check it out. Make sure you don't create a group that already exists. Then make your user account part of the group with usermod. (man usermod to get the options for adding a user to a group..... the -G option is sounding good to me.) Once you do this, check out the /etc/group file again, you should see the user added into the line with your group name. The final step is to chown the directory you want and change the group ownership to wineuser instead of root.

I can only spoon feed so much, think about what you are doing. Use the man pages to get options and see examples. Also think about who you need to be logged in as in order to accomplish certain goals and modify certain things. Who do you need to be logged in as if you are changing group permissions from root to wineuser?

Reading your post again....why are you trying to create .\user\ and where is it trying to create this? That could be part of the problem. How does that interact with the Linux O/S (may be wine, don't know don't use it, it's not part of the distro)? Watch your slashes. CAREFUL: don't try to make / and ls on / and see what's there. Make sure the package you are trying to make is for the correct version of Red Hat. RPM's may be your friend if your a newbie.....find RPM on the internet, download rpm, install rpm with rpm -ivh rpm_name-version.i386.rpm. Also, there should be a README included with what you have, any catches in it about file permissions? Where to install? etc...

Goo luck.
Old 09-03-2003, 10:49 PM   #5
LQ Newbie
Registered: Aug 2003
Location: bc canada
Distribution: red hat
Posts: 2

Original Poster
Rep: Reputation: 0

Thanks to jhibbets and all those that answered.
Worked like a charm.
Took me a while to figure out Linux directory structure and methods of traversing them, but got it.
Installed Wine, created c: drive and played solitaire,
No this is not the "must-have" win app but it was a start.

Thanks alot.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
write permissions on certain folders PensJunkie Linux - General 4 06-20-2005 08:17 PM
Permissions of new folders through samba doctorwebbox Linux - Networking 9 08-10-2004 01:46 AM
Settign permissions on folders reddog64 Linux - Newbie 3 04-19-2004 03:23 PM
NTFS- cannot alter permissions of files, only folders tomranson Linux - General 2 10-19-2003 04:27 AM
Permissions with windoze folders sportjeep99 Linux - General 1 06-07-2001 11:07 PM > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 08:50 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration