Added a new user, yet no privilege to open website's folders

I need to offer user account for engineers from outside to view my website's files, hence, I followed https://library.linode.com/securing-you … a-new-user">https://library.linode.com/securing-your-server#sph_adding-a-new-user to add a new user for my website.

The problem is the newly added user account cannot open the main folders for the wordpress website.

My system is as follows.

Debian 6

Nginx

PHP-FPM

Percona

APC

Memcached

firewall in place.

The website is using Wordpress 3.8 with lots of plugins.

I have tried to have support from Linnode.com, and they have paid their patience tried to help me, yet, unfortuanlly, it seems they have no further action that they can do to help me to solve my problem here.

I am trying to add one user, which is engin112s, to be able to view files in my Wordpress files: files under /enihongo/wps/ in the file structure.

When I login, it shows the engin112s folder, not the enihongo, I need to go to upper folder to view enihongo.

https://www.evernote.com/shard/s12/sh/6 … 8ab9c573b8">https://www.evernote.com/shard/s12/sh/60ed6e2d-81cb-4038-a44b-9ffa6d3cc027/7b315b485cb6acfec05cc18ab9c573b8

I have followed the engineer's suggestion (from Linode.com) to do following command, I hope somebody else could help me to find out what the problem is….

(From following commands and result, it possibly could be seen that the main admin is enihongo, and I am trying to set up a user called engin112s to be able to view folders of /home/enihongo/wps/

root@enihongo:~# ps auxf | grep -i nginx | grep -v grep

root 2328 0.0 0.0 63736 344 ? Ss Jan04 0:00 nginx: master process /usr/sbin/nginx

enihongo 2332 0.0 0.1 65468 1560 ? S Jan04 0:40 _ nginx: worker process

enihongo 2342 0.0 0.1 64744 1608 ? S Jan04 0:39 _ nginx: worker process

enihongo 2344 0.0 0.1 64856 1760 ? S Jan04 0:39 _ nginx: worker process

enihongo 2345 0.0 0.1 65048 1768 ? S Jan04 0:40 _ nginx: worker process

enihongo 2347 0.0 0.1 64912 1728 ? S Jan04 0:39 _ nginx: worker process

enihongo 2348 0.0 0.1 65092 1692 ? S Jan04 0:40 _ nginx: worker process

enihongo 2351 0.0 0.1 64936 1792 ? S Jan04 0:40 _ nginx: worker process

enihongo 2352 0.0 0.1 64860 1712 ? S Jan04 0:39 _ nginx: worker process

root@enihongo:~#

root@enihongo:~# usermod -a -G www-data engin112s

root@enihongo:~# chown :www-data /home/enihongo

root@enihongo:~# usermod -d /home/enihongo engin112s

usermod: user engin112s is currently logged in

root@enihongo:~# chown -R :www-data /home/enihongo

root@enihongo:~#

root@enihongo:~# ls -lah /home/enihongo

total 444K

drwxr-xr-x 6 enihongo www-data 4.0K Dec 25 09:29 .

drwxr-xr-x 6 root root 4.0K Jan 8 04:44 ..

-rw------- 1 enihongo www-data 330 Jan 8 04:44 .bash_history

-rw-r--r-- 1 enihongo www-data 220 Apr 10 2010 .bash_logout

-rw-r--r-- 1 enihongo www-data 3.2K Apr 10 2010 .bashrc

-rw-r--r-- 1 enihongo www-data 85 Jul 14 2012 BingSiteAuth.xml

-rw-r--r-- 1 enihongo www-data 11K Mar 21 2013 d391e1aeac4e855407f815426a084e8fa0e4023e.php

-rw-r----- 1 enihongo www-data 356K May 14 2013 dead.letter

-rw-r--r-- 1 enihongo www-data 53 May 9 2013 google83a433f452f2ac13.html

-rw-r--r-- 1 enihongo www-data 53 Oct 28 2012 googlecc95c67df6485a35.html

-rw-r--r-- 1 enihongo www-data 22 Aug 29 2011 googlehostedservice.html

drwxr-xr-x 11 enihongo www-data 4.0K Dec 25 09:29 image

-rw-r--r-- 1 enihongo www-data 675 Apr 10 2010 .profile

drwxr-xr-x 3 enihongo www-data 4.0K Dec 25 09:29 songs

drwxr-xr-x 3 enihongo www-data 12K Dec 25 09:29 sound

drwxr-xr-x 13 enihongo www-data 4.0K Dec 25 09:29 upload

lrwxrwxrwx 1 root www-data 42 Dec 25 09:29 wps -> /var/www/vhosts/enihongo.com/httpdocs/wps/

-rw-r--r-- 1 enihongo www-data 256 Aug 29 2011 ykey0c3b6130986cd88b.html

-rw-r--r-- 1 enihongo www-data 223 Aug 29 2011 ykey4329b88c13b569ab.html

root@enihongo:~#

root@enihongo:~# groups engin112s

engin112s : engin112s sudo www-data

root@enihongo:~#

root@enihongo:~# useradd -G www-data engin112s

useradd: user 'engin112s' already exists

root@enihongo:~#

root@enihongo:~# ls -lah /var/www/vhosts/enihongo.com/httpdocs/wps/

total 452K

drwxr-xr-x 5 enihongo enihongo 4.0K Jan 8 04:59 .

drwxr-x--- 8 enihongo enihongo 4.0K Dec 25 09:33 ..

-rw-r--r-- 1 enihongo enihongo 11K Dec 9 2012 d391e1aeac4e855407f815426a084e8fa0e4023e.php

-rw-r--r-- 1 enihongo enihongo 8.0K Jan 4 10:34 error_log.txt

-rw-r--r-- 1 enihongo enihongo 1.4K Dec 21 01:56 .htaccess

-rw-r--r-- 1 enihongo enihongo 217K Feb 18 2013 IMG19022013125710.png

-rw-r--r-- 1 enihongo enihongo 418 Oct 30 05:45 index.php

-rw-r--r-- 1 enihongo enihongo 20 May 29 2013 info.php

-rw-r--r-- 1 enihongo enihongo 20K Oct 30 05:45 license.txt

-rw-r--r-- 1 enihongo enihongo 7.2K Dec 16 09:24 readme.html

-rw-r--r-- 1 enihongo enihongo 4.8K Oct 30 05:45 wp-activate.php

drwxr-xr-x 9 enihongo enihongo 4.0K Dec 25 09:33 wp-admin

-rw-r--r-- 1 enihongo enihongo 271 Oct 30 05:45 wp-blog-header.php

-rw-r--r-- 1 enihongo enihongo 4.7K Oct 30 05:45 wp-comments-post.php

-rw-r--r-- 1 enihongo enihongo 3.6K Jan 3 20:17 wp-config.php

-rw-r--r-- 1 enihongo enihongo 3.2K Aug 2 03:35 _wp-config-sample.php

-rw-r--r-- 1 enihongo enihongo 4.4K Oct 30 05:45 wp-config-sample.php

drwxr-xr-x 14 enihongo enihongo 12K Jan 8 04:59 wp-content

-rw-r--r-- 1 enihongo enihongo 2.9K Oct 30 05:45 wp-cron.php

drwxr-xr-x 12 enihongo enihongo 4.0K Dec 25 09:34 wp-includes

-rw-r--r-- 1 enihongo enihongo 2.4K Oct 30 05:45 wp-links-opml.php

-rw-r--r-- 1 enihongo enihongo 2.4K Oct 30 05:45 wp-load.php

-rw-r--r-- 1 enihongo enihongo 32K Dec 16 09:24 wp-login.php

-rw-r--r-- 1 enihongo enihongo 8.1K Dec 16 09:24 wp-mail.php

-rw-r--r-- 1 enihongo enihongo 11K Dec 16 09:24 wp-settings.php

-rw-r--r-- 1 enihongo enihongo 26K Dec 16 09:24 wp-signup.php

-rw-r--r-- 1 enihongo enihongo 4.0K Oct 30 05:45 wp-trackback.php

-rw-r--r-- 1 enihongo enihongo 3.0K Oct 30 05:45 xmlrpc.php

root@enihongo:~#

And follows.

root@enihongo:~# chown -R :www-data /var/www/vhosts/enihongo.com/httpdocs/wps/

root@enihongo:~#

Yet, it seems the same .. not solved.

Then, I was suggested to run following commands.

engin112s@enihongo:~$ cd /var/www/vhosts/enihongo.com/httpdocs/wps/

-bash: cd: /var/www/vhosts/enihongo.com/httpdocs/wps/: Permission denied

engin112s@enihongo:~$

Then,

root@enihongo:~# ls -l /var/www/vhosts/enihongo.com/httpdocs/

total 312

-rw-r--r-- 1 enihongo enihongo 85 Jul 14 2012 BingSiteAuth.xml

-rw-r--r-- 1 enihongo enihongo 53 Dec 10 2011 google163a948ad0605841.html

-rw-r--r-- 1 enihongo enihongo 53 Oct 28 2012 googlecc95c67df6485a35.html

-rw-r--r-- 1 enihongo enihongo 53 Jun 3 2013 googlef0f34a52655ae555.html

-rw-r--r-- 1 enihongo enihongo 22 Aug 29 2011 googlehostedservice.html

-rw-r--r-- 1 enihongo enihongo 1502 Aug 20 04:22 __.htaccess

drwxr-xr-x 4 enihongo enihongo 4096 Dec 25 09:32 image

drwxr-xr-x 10 enihongo enihongo 4096 Dec 25 09:32 images

-rw-r--r-- 1 enihongo enihongo 399 Jan 27 2013 index.php

-rw-r--r-- 1 enihongo enihongo 7161 Dec 28 02:07 nginx.conf

-rw-r--r-- 1 enihongo enihongo 202691 Sep 4 05:43 sitemap.xml

-rw-r--r-- 1 enihongo enihongo 29674 Sep 4 05:43 sitemap.xml.gz

drwxr-xr-x 3 enihongo enihongo 4096 Dec 25 09:32 songs

drwxr-xr-x 3 enihongo enihongo 12288 Dec 25 09:32 sound

drwxr-xr-x 15 enihongo enihongo 4096 Dec 25 09:33 upload

drwxr-xr-x 5 enihongo www-data 4096 Jan 8 04:59 wps

-rw-r--r-- 1 enihongo enihongo 256 Aug 29 2011 ykey0c3b6130986cd88b.html

-rw-r--r-- 1 enihongo enihongo 223 Aug 29 2011 ykey4329b88c13b569ab.html

root@enihongo:~#

Finally, I was suggested to run following command again:

chown engin112s:www-data /var/www/vhosts/enihongo.com/httpdocs/wps

and after this command.. I still couldn't open the wps folders, using the engin112s..

Could anyone here help me, please. …

0 Replies

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct