2

My public key was recently added to a ubuntu server so that I can remotely log in as root. However, when I log in as root. I cant do some simple tasks like mkdir . Is there something I am missing here. Root users are supposed to be able to do everything. right? I get a permission denied when I try to create a directory somewhere else other than my root home directory.

4
  • 1
    You should post a sample command and the output so we may check your syntax. Also post the output of the command id . If you are truly logged in root (uid=0), and you are restricted, it would have to be by a tool such as apparmor. In that event you will need to discuss the issue with your system administrator.
    – Panther
    Feb 24, 2012 at 2:29
  • sample command: I cs into the home directory of another user and type "$mkdir foldername". I get a "permission denied" output. id shows a userid=0 and groupid=0
    – Keeto
    Feb 24, 2012 at 2:33
  • You are being confined by some mechanism, apparmor would be the default tool on Ubuntu. Perhaps some other means, you should ask your system administrator.
    – Panther
    Feb 24, 2012 at 2:40
  • Another possibility is the homedirs are NFS mounted, and root_squash is in effect (the owner of the directory can use it, but not root).
    – Caesium
    Feb 24, 2012 at 2:50

1 Answer 1

2

If you can not create files/folders as root then their is normally 2 things I would check. First I would check there is space on the disk.

df -h

The other to check is that the file system is not read only, you can check this using the mount command, if you do not understand the output then paste it here.

mount

after the open bracket '(' on each line it should show 'rw' to mean read/write.

note: as a system administrator I would advise against anyone running as root, there is no need for it. I would also set PermitRootLogin No in */etc/ssh/sshd_config*. It is better to run as a normal user and then use sudo command or sudo -s if you need to perform any actions as the super user.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .