1

I have an account on a server (the admin is crappy) and he set my user home at /home/username. He also took away my access to this user directory, and said I should use /home/Guest which is root:root and public writable (permissions 777).

As I don’t want to use it, I thought I will make a sub directory of /home/Guest which is not public writable, and set it as my home. unfortunately

usermod -m -d /home/Guest/dir username

Failed with command not found. What can I do (I already contacted him), to get some home folder (he denied, I don't know why)

2
  • 4
    Unfortunately, your only option is to work with whomever has root access to the server. First, usermod is probably installed on the system but sbin isn't in your path since you're not a root user. Second, AFAIK, only the root user or a user with root permissions can modify the passwd file which is used to determine your home directory. – int_541 Sep 16 '15 at 5:27
  • you might be able to create files inside home directory without root access like this unix.stackexchange.com/questions/138162/… other than that root was the only option AFAIk – BlueBerry - Vignesh4303 Sep 16 '15 at 12:26
1

You can only do this temporarily. This means that every time you login as that user you have to run this one command:

export HOME=/home/Guest/dir

This way, you can make most applications think that your home directory is whatever location you use above.

~ will also start to point to /home/Guest/dir.

The applications this worked with for me were NPM and Maven.

1
  • 1
    Ages ago..... Interesting how naïve I was :) tho accepted the answer! – Schwertspize Jan 15 '18 at 13:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.