as root do
Code:
cd /home
chmod -R u+rw myname
cd myname
find -type d | while read DIR ; do
chmod u+x "$DIR"
done
the "find -type d | while read DIR ; do " command is a loop,
it finds all "files" of the type DIRECTORY ( so it finds all directories, but in UNIXes everything is a file, it is a philosophy thing, just like in WIN32 : "everything is an OBJECT" ), then for each found FILE (which is stored in the variable DIR, we change the permissions to allow searching (executing) the directory.
This should put some correct permisssions on all files , and directories in your home dir.
Big question is:
How did things get screwed up like this?
Did you copy you home directory to cd and back, or from to FAT32, or any thing like it?
Nope, I didn't do anything along these lines.
Ok, so I now have my guest account back - I'm not sure why, but I'm that closer to happy. As for my account, well, that is a different story, I still cannot get access to it. I went back to the cp command from an earlier post, and this is what happened:
[root@localhost root]# cd /home
[root@localhost home]# mkdir myname
mkdir: cannot create directory `myname': File exists
[root@localhost home]# cd etc/skell
bash: cd: etc/skell: No such file or directory
[root@localhost home]# cp -R * .* /home/myname
cp: cannot copy a directory, `myname', into itself, `/home/myname/myname'
cp: cannot copy a directory, `myname', into itself, `/home/myname/myname'
cp: cannot copy a directory, `myname', into itself, `/home/myname/myname'
That didn't seem to go very well, so then I checked the file permissions again:
[root@localhost root]# ls -lah /home
total 32K
drwxr-xr-x 7 root root 4.0K Jun 6 23:52 ./
drwxr-xr-x 19 root adm 4.0K Jun 8 19:19 ../
drwx--x--x 23 guest guest 4.0K Jun 6 11:09 guest/
drwx--x--x 2 root root 4.0K Mar 18 13:38 lost+found/
d--------T 54 guest guest 8.0K Jun 12 01:38 myname/
drwx--x--x 30 mary mary 4.0K Jun 11 09:15 mary/
drwx------ 2 root root 4.0K Jun 9 03:02 .Trash-root/
[root@localhost root]#
These are all the same as my last post. Then I did what you told me to above:
[root@localhost root]# cd /home
[root@localhost home]# chmod -R u+rw myname
[root@localhost home]# cd myname
[root@localhost myname]# find -type d | while read DIR ; do
> chmod u+x "$DIR"
> done
[root@localhost myname]#
Then I checked the file permissions again:
[root@localhost myname]# ls -lah /home
total 32K
drwxr-xr-x 7 root root 4.0K Jun 6 23:52 ./
drwxr-xr-x 19 root adm 4.0K Jun 8 19:19 ../
drwx--x--x 23 guest guest 4.0K Jun 12 01:54 guest/
drwx--x--x 2 root root 4.0K Mar 18 13:38 lost+found/
drwx-----T 54 guest guest 8.0K Jun 12 01:38 myname/
drwx--x--x 30 mary mary 4.0K Jun 11 09:15 mary/
drwx------ 2 root root 4.0K Jun 9 03:02 .Trash-root/
[root@localhost myname]#
I see that some permissions have changed: drwx-----T 54 guest guest 8.0K Jun 12 01:38 myname/
However, I am still unable to access my account without resorting to root. I greatly appreciate that you have explained most of what you have asked me to do, and now I have another question for you. I don't understand why two of these are the same, but the third is not:
drwx--x--x 23 guest guest 4.0K Jun 12 01:54 guest/
drwx--x--x 30 mary mary 4.0K Jun 11 09:15 mary/
drwx-----T 54 guest guest 8.0K Jun 12 01:38 myname/
Shouldn't it be myname myname 8.0K Jun 12 01:38 myname - the same format as the "working" accounts? And what is that "T" mean?! On a related note, what is lost+found and its relation to root?
Finally, I just want to say that I bought an introductory book to linux tonight - hopefully I won't be a newbie to linux forever. I'm sure I'm asking you some very basic questions.