Change HOME directory?
Since I don't have access to ~/, I can't create a direcctory called ".ssh" (so I keep getting this error: Could not create directory '"<REM>/.ssh'.).
IS there any way I can fool "ssh" and change the directory (home path presumably) to something that I have access to write too? |
Hi,
To change user_foo home directory, use usermod command: Code:
usermod -d /new/path user_foo Code:
usermod -d /new/path -m user_foo |
Quote:
|
Quote:
|
As a bit of an aside, I thought that "~" was automagically expanded to your home directory (wheresoever it lived) as opposed to just "/home/<username>". In any event, it sounds like you actually don't have write permissions in your home directory... The home directory is specified in the /etc/passwd file, and if you haven't changed things yet, I'd be very interested to see the output of
Code:
ls -ld ~ Code:
cat /etc/passwd | grep <yourusername> | cut -d : -f 6 |
Quote:
|
It wasn't just the names I was interested in, but the permissions on "~" (whatever it expands to). If you have write access, you should be able to create the directory '.ssh'. If you don't have write access, then I wouldn't advise any workarounds - there'll be a lot of software out there (probably Linux itself) that assumes you have write access to your home directory, so it's worth fixing...
Edit: And there'll be ways around PLESK screwing things up, too. If it really likes to play around with environment variables and the like, it should probably have its own user. I run an Oracle database off this box, which has its own user for the same reason. |
~/ indeed expands to your home directory.
~some_user/ expands to some_user's home directory, where you can replace "some_user" by any valid username on your system. |
All times are GMT -5. The time now is 05:51 AM. |