• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

change permission of a directory?

Is it possible?

I got lke 9 winamp skins and wanted to stick them in /usr/share/smms/skins directory but it wouldn't let me since i didn't have permission

so then I went and found out how to copy in the command line

and I copied them while logged into root to the folder but then i could access them
so then i did a search on changing file permissions and did "chmod 7 boa_1.zip" so i could access them but i did this 9x over for different skins

is there just a command ( i couldn't find it- that and i had to hurry to class) that lets me change the permission of a directory
 
ah...I see......doing chmod 7 *.* pretty much covers it all...

But what about the actual directory? Is that where -R comes into play (i don't see where that comes into play)
 
Originally posted by: magomago
ah...I see......doing chmod 7 *.* pretty much covers it all...

But what about the actual directory? Is that where -R comes into play (i don't see where that comes into play)

chmod [mode] directory name
 
To chmod with numbers

For normal files:

You have Read Write Execute

They go in binary formats

4= read 2=write 1=execute

So if you want read AND write permissions

then that=4+2=6

To make a file a executable you add 1 to it's permissions.

4+2+1=7 you get read, write, and execute
4+1= read-only and execute
2+1 = write-only and execute (although I don't know why you'd want that...

Then on top of that you have 3 clasess of users:

Owner, Group, and Everyone else.

In a ls -l you get:

-rwxr-xr-x

the first - isn't something you have to worry about at this stage in the game. The first rwx = for Owner, 2nd rwx = for people that belong to that group, 3rd rwx = everyone else.

In this instance that file would be executable by everyone, but only the owner can write to it.

However directories it's a bit different.

drwxr-xr-- 2 root users 6 Nov 12 19:08 cow

the d = directory

those X's = someone can cd (change directory) to it. Think about it as if you need to execute the directory to be inside the directory.

So in this case:

Only root can read files from it AND write files to it AND change directory to it.

Anyone belonging to the group "users" can cd to it AND read files from it, but can't make new files (or remove files I beleive)

Everyone else can only read the filename and info from it. (ls cow), but can't write files to it OR cd to it.


So if you want to have your user to be able to write files to it.

1. make a group that the user can belong to and use the chown command to make that group own the directory, then chmod 775 the directory.

2. chmod 777 the directory.

3. or make the user the owner of the directory thru the chown command.

(chown user:group filename)





 
thanks drag!! I found something similar to it in the Redhat documentation but you make the explanation of docs easier
 
Back
Top