Linux 4.4.0-75-generic #96-Ubuntu SMP Thu Apr 20 09:56:33 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Permissions seem wide open
>>> ll /
...
drwxrwxrwt 8 root root 4096 May 1 02:44 tmp/
Denied access:
sudo -u www-data echo "hello" > /tmp/test.txt
-bash: /tmp/test.txt: Permission denied
Disk space seems OK:
>>> df -h
Filesystem Size Used Avail Use% Mounted on
udev 980M 0 980M 0% /dev
tmpfs 200M 8.2M 192M 5% /run
/dev/xvda1 7.8G 6.3G 1.1G 86% /
tmpfs 1000M 0 1000M 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 1000M 0 1000M 0% /sys/fs/cgroup
cgmfs 100K 0 100K 0% /run/cgmanager/fs
tmpfs 200M 0 200M 0% /run/user/1000
Best Answer
Probably the file already exists. In this case, if it has been created by another process already, the system will not allow you to either modify or delete it since you're not the owner. In this case, right after the file is created, you might want to
I had the same exact problem, and this was the solution.