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
to show you the names and permission masks; directories should look like
Code:
drwxr-xr-x 2 owner group 4096 Jan 13 2010 test/
and files should look like
Code:
-rw-r--r-- 1 owner group 1484 Oct 26 2009 testing.doc
where "owner" is the name (or, possibly, a number, see below) of "who" owns the file or directory and "group" is the name (or number) of the group. Note that the number immediately to the left of the date is the size of the directory or file; ignore it.
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!
find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
That will fix the masks (note: that will set
all files to read-write, read, read -- if you have any files that you want executable, you'll need to manually change them with
but don't do that now.
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 *
That should do it.
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
You ought to see something similar to
Code:
users lp floppy dialout audio video cdrom plugdev power usbfs netdev scanner vboxusers cvs
(Yours will probably vary).
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.