Newbie needs help to change folder/file permissions
I've previously run Mandriva OS but have now changed to Suse Enterprise Desktop.I imported files and folders from My backup hard disc but they are all "locked" I tried going into properties but I'm told as I'm not the owner I can't change anything.
How do I change the permissions? IN SIMPLE STEP BY STEP INSTRUCTIONS PLEASE as I'm a bit of an ignoramus |
You'll have to do that as root (either logged in as root, use su - or using sudo) in a "terminal" window.
You'll need to be careful depending upon where the directories and files were "imported" to; i.e., just exactly what did you import? Your own directories and files? System directories and files? Your own stuff you can do as below but, if you somehow imported system directories and files, you don't want to fiddle with them (system directories would be such as /etc, /usr/bin, /lib and the like). So, let's assume that what you imported was your /home/username directory from the Mandriva system? Maybe some data directories and files? Stuff that's not system stuff? Change directory to wherever your directories/files were put and execute Code:
ls -al Code:
drwxr-xr-x 2 owner group 4096 Jan 13 2010 test/ Code:
-rw-r--r-- 1 owner group 1484 Oct 26 2009 testing.doc If either the owner or group is numeric that would be because on your new system there is no owner or group with those identification numbers -- not to worry. So, let's say that these recovered files don't have the default mask values (drwxr-xr-x for directories and rw-r--r-- for files) and you'd like to correct them to a reasonable default. If they do have the default mask values, don't do this. Still logged in as root (or using sudo) Code:
cd to the directory where all the files and directories are -- do not do this in the root directory! Code:
chmod 755 filename Now, let's assume that you want the directories and files to be owned by you; i.e., your login, and your default group (most likely "users"): Code:
chown -R your_login:users * Before you start, you might want to glance at the manual pages for find, chmod and chown to get a feel for what they do. Also, before you start, logged in as "you," and enter Code:
groups Code:
users lp floppy dialout audio video cdrom plugdev power usbfs netdev scanner vboxusers cvs Your default group is the first one on the left, in this case users. That's the one you use above. Hope this helps some. |
Hi tronayne, didn't understand a lot of what you posted BUT I tried this "chown -R your_login:users * "
and it worked a treat, many thanks. |
All times are GMT -5. The time now is 11:10 PM. |