Tuesday, April 30, 2024
 Popular · Latest · Hot · Upcoming
11
rated 0 times [  11] [ 0]  / answers: 1 / hits: 99065  / 2 Years ago, mon, september 19, 2022, 8:32:22

I have a headless Ubuntu 12.10 server. I'm logged in as administrator via SSH. I cannot create a directory in my home directory:



administrator@Leo:~$ cd ~
administrator@Leo:~$ mkdir Test
mkdir: cannot create directory `Test': Permission denied


The equivalent as root does work:



administrator@Leo:~$ sudo mkdir Test

administrator@Leo:~$ ls -al
total 12
dr-x------ 3 administrator administrator 4096 Jul 14 21:14 .
drwxr-xr-x 6 root root 4096 Oct 26 2011 ..
lrwxrwxrwx 1 administrator administrator 56 Sep 11 2011 Access-Your-Private-Data.desktop -> /usr/share/ecryptfs-utils/ecryptfs-mount-private.desktop
lrwxrwxrwx 1 administrator administrator 39 Sep 11 2011 .ecryptfs -> /home/.ecryptfs/administrator/.ecryptfs
lrwxrwxrwx 1 administrator administrator 38 Sep 11 2011 .Private -> /home/.ecryptfs/administrator/.Private
lrwxrwxrwx 1 administrator administrator 52 Sep 11 2011 README.txt -> /usr/share/ecryptfs-utils/ecryptfs-mount-private.txt
drwxr-xr-x 2 root root 4096 Jul 14 21:14 Test


I am unsure where the ecryptfs-related stuff comes from. I don't believe I requested encryption of my home directory, but perhaps that is causing things to go awry? Can anyone explain what's gone wrong here and/or provide a solution?


More From » server

 Answers
5

The current directory (your home) is missing the "w" (write) permission.
Try these commands



cd ~
chmod u+w .


Don't forget the dot at the end. It represents the current directory.



Or you can do the same with just one command:



chmod u+w ~


You don't even need sudo according to my tests.


[#36861] Wednesday, September 21, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
nguai

Total Points: 216
Total Questions: 108
Total Answers: 116

Location: Hong Kong
Member since Thu, Dec 16, 2021
2 Years ago
;