LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Mandriva (https://www.linuxquestions.org/questions/mandriva-30/)
-   -   Can not write files to /home (https://www.linuxquestions.org/questions/mandriva-30/can-not-write-files-to-home-368629/)

TigerLinux 09-30-2005 11:52 PM

Can not write files to /home
 
Donno why, i am using mandriva 2006 RC2, i login as my own name, when i tried to copy files from flashmemory to my /home, it prevented me to do so,
i got to logout and login as Root, then it can be done.
why? due to settings? how to fix it?

valerie_tux 10-01-2005 02:19 AM

While you are still root, change the ownership of your home folder to your username. Still are you sure that it was not the the flashdrive which was denied..that case happens quite often where only Root has full access to external memory devices.

Slith(++1) 10-02-2005 09:04 PM

Do you mean you cant write to /home or /home/'user_name' because its normal to not be able to write to /home.

TigerLinux 10-02-2005 09:40 PM

/home/yplim

yplim is my login name

i have files created by root and stored in /home/yplim

when i tried to edit the file as yplim login, can not do that

Micro420 10-03-2005 12:04 AM

Quote:

Originally posted by TigerLinux
/home/yplim

yplim is my login name

i have files created by root and stored in /home/yplim

when i tried to edit the file as yplim login, can not do that

This has happened to me before when I reinstalled/updated my Mandriva and NOT my /home directory. The way I fixed it was in the console as root:

chmod 777 /home/yplim -R
chown yplim /home/yplim -R

I believe that should give you read/write permissions to your /home/yplim directory.

Another way to try is to log in to KDE/GNOME:

username: root
<root password>
open konqueror
right-click /home/yplim
then change permissions and ownership from there.

springshades 10-03-2005 03:46 AM

I believe this should be sufficient and would probably be a preferable way of doing it.

chmod 755 /home/yplim -R
chown yplim /home/yplim -R

This gives full permissions to the owner (yplim), but only give read execute priviledges to other users. I believe this is the standard for everything except for:

/home/'user name'/tmp

Which I think has... 700 permission? Not quite sure.

tkedwards 10-03-2005 06:06 PM

Quote:

chmod 755 /home/yplim -R
chown yplim /home/yplim -R

This gives full permissions to the owner (yplim), but only give read execute priviledges to other users. I believe this is the standard for everything except for:

/home/'user name'/tmp

Which I think has... 700 permission?
Its really a personal preference, if you want other people to be able to read any file in your home directory then have it 755. I think the default is to have the top level directory (ie. /home/yplim) as 751 (rwxr-x--x) and have all the directories and subdirectories with no access for others.

archtoad6 10-04-2005 08:14 AM

What is the default group for 'yplim'?

If its' "yplim" too, then '775' is fine. If, on the other hand, it is something more general like "users", '755' is correct.

Some distros (scenario 1) follow the RH strategy of giving every user an unique group name, identical to the user name. For these, you allow full access to your files by adding other users to your personal group, ergo the '775'. Other distros (scenario 2) follow the SimplyMEPIS strategy of putting all users in a single group "users". For these, '755' is appropriate; & allowing individual additional users access to your files gets more complicated.

Finally, don't forget to change the group ownership on your files, not just the user:
Code:

chown yplim:yplim /home/yplim -R
or more generally:
Code:

chown yplim:<yplim's base group> ~yplim -R
Useful aside for new folk
  1. ~/
  2. $HOME/
  3. /home/<user>/
all mean the same thing -- 1 & 2 expand to 3.

tkedwards 10-04-2005 06:19 PM

Quote:

Some distros (scenario 1) follow the RH strategy of giving every user an unique group name, identical to the user name. For these, you allow full access to your files by adding other users to your personal group, ergo the '775'.
Actually in this case its irrelevant wether its 755 or 775 as it makes no difference. You'll find most distros following the RH strategy will have 022 or 027 as a umask and will default to 751 or 755 on the home dir.


All times are GMT -5. The time now is 10:29 AM.