LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Could not write to my home directory (https://www.linuxquestions.org/questions/linux-newbie-8/could-not-write-to-my-home-directory-180451/)

comprookie2000 05-11-2004 05:34 PM

Could not write to my home directory
 
:Pengy: Strange very Strange,I use Mepis and I downloaded some icons to my home,ran;
su
<password>
tar xjf icons.tar.bz2
nothing happened so I typed ls,and it unziped to my home folder,when I tried to download something to my home access was denied that I could not right to that,wow so I loged out and tried to log back in and could not,loged back out log in as root changed the permissions on my home and now I can log in,what else do I need to do to fix up this mess I got myself in,thanks david

Tinkster 05-11-2004 05:37 PM

Not quite sure how untaring something
as root would change all permissions/ownerships,
but try ...
su -
find /home/<userid> -exec chown <userid>:users {} \;


Cheers,
Tink

leonscape 05-11-2004 05:37 PM

When you did su you logged in as root. So when you un tarred the files root wrote them, so root owns any files created ( no access as a normal user ). You do not need to be root to un tar files in your home directory, unless root downloaded them ( then just change the owner with chown ).

comprookie2000 05-11-2004 05:47 PM

I tried that tinkster,no such file or directory,when I untared them I just messed up is all I know I don't have to be root,daydream or something,thanks david

comprookie2000 05-11-2004 05:54 PM

should I just do ;
/home/<userid> -exec chown <userid>:users {} \;
thanks,

comprookie2000 05-11-2004 06:31 PM

Is there a way to chown everything in the directory to me or should I just trash the folders that are roots,thanks david

leonscape 05-11-2004 06:35 PM

You use the recursive option

chown -R newowner:newgroup thedirectory

comprookie2000 05-11-2004 07:06 PM

Thanks, chown -R david: <what group should I put?> /home/david :Pengy:

leonscape 05-11-2004 07:10 PM

Usually the same group as you user name. i.e.

chown -R david:david thedirectory

See what your other files are with ls -l

comprookie2000 05-11-2004 07:18 PM

Would it be chown -R david:user /home/david
the icons ended up -rwxr -xr-- 1 1006 81

leonscape 05-11-2004 07:27 PM

It could be... depends on your system thats why I suggested ls -l. mine looks like for one file.

-rw-r--r-- 1 leonscape leonscape 1190201 2004-05-07 23:22 Labryinth.png

or

-rw-r--r-- 1 1000 1000 1190201 2004-05-07 23:22 Labryinth.png

For some reason the -n option seems to be on for your ls command.

comprookie2000 05-11-2004 07:40 PM

The other files are -rw-r--r-- 1 david user
the directorys are drwxr-xr-x 2 david user
and the icons I would like to change are -rwxr -xr-- 1 1006 81 thanks again,david

leonscape 05-11-2004 07:50 PM

Then chown -R david:user it is.

comprookie2000 05-11-2004 07:57 PM

invalid group david:user should I try david:david or just leave it alone everything is working :Pengy: thanks for your time

leonscape 05-11-2004 08:01 PM

That weird, but try david:david to see if its a valid group.


All times are GMT -5. The time now is 11:04 PM.