On ubuntu server 10.04.4 I did this:
sudo mkdir -p /data/somedir
sudo chown -R www-data.www-data /data/somedir
sudo chmod -R g+w /data/somedir
sudo usermod -a -G www-data john
. With these operations, I assume that I have write permission to /data/somedir. But when I did this:
echo "123" > /data/somedir/123
I got:
-bash: /data/somedir/123: Permission denied
Output ls -l:
$ ls -l /data/
total 4
drwxrwxr-x 2 www-data www-data 4096 2012-04-24 22:30 somedir
Question: why? Anything else I need to do after this?
source
share