permissions?

Carlosinfl

Loves the juice
Joined
Sep 25, 2002
Messages
6,633
I am creating a folder called wallpaper = for all my wallpaper on my desktop.

Code:
[carlos@localhost carlos]$ su
Password:
[root@localhost carlos]# mkdir wallpaper

I think the mistake I made was creating these folders as root so now as I am browing websites as my user, I can't right click any files online and save to that directory as that user because I get an error saying that the folder is not writable...

I tested my theory above by creating a simular dir wallpaper2 but stayed as a user, not root and I could write to the dir with no problem.

My question is how do I allow carlos permissions to write to folders or dir created by root?
 
Well, since root made it, by default root owns it and only root has rw privileges on the directory.

What I suggest is reading up on chmod, or just making the folder as a regular user. Gotta do some work for yourself.

Code:
man chmod
 
chown is probably more important

if you're making a directory in your home directory, you don't need to be root to make it...
 
chmod is what i use.. example -- chmod 777

drwxrwxrwx is what that does.....

d is directory
first rwx is for user... second rwx is for group.. and third rwx is for world

these have values assigned to them

rwx = 7

r = 4
w = 2
x = 1

from this u should be able to setup any permissions on files or folders that you want..
 
Why not just use CHOWN so he can take ownership of the directory and not have to open it up to everyone? Granted, CHMOD would accomplish the same thing, but then everyone would have access to the directory. May not be a big deal, but it seems like a security thing in it's roots. Maybe I'm thinking like I'm at work. I could be wrong though...
 
he can chown it if he wants.. but i was trying to teach him to use chmod to figure out what permissions to give.. i just used 777 as an example.. he could just chmod 744 to give users full permissions and just read only to everyone else.. just by adding the values...

i use chown mostly for apache or mysql or something.. when i want them to own the directory.. not really users.. although there should be no problem if you wanted to do this for users.
 
Probably what he wants is:

chmod 775 [directoryname] (since it's a directory.)
chown *userid* [directoryname]
chgrp *usergroup* [directoryname]

The only thing I ever really have to mess with permissions for is if I install a gnome theme and then want every user to have it, so I copy the stuff with root into the global gnome theme directories.

Well, I also have /var/www set differently, so I can edit webpages with my main account, though I just changed it's group to "webmaster" and put myself in that group.
 
chown -R user:group directory

This would affect the permissions of the contents of the directory too. I wind up using it all the time.
 
but who needs a wallpaper-folder inside of the root-folder accessible for all?
su to root, delete that folder and as user carlos make a folder in your OWN home.
 
It's possible that he wants the files somewhere that any user can get to them - like /usr/share/wallapers on a FC installation.

If he's got a family computer and wants themes or wallpapers available to everyone, I can understand why you'd do this. As long as he's being careful and only including a specific directory, it shouldn't be a security problem; he could create a group specifically for shared documents and just set that single folder's permissions.
 
Back
Top