1
Panel ISPmanager set up user domain_name
. I want to add another user (dev_2
), who is also involved in the development of the site. Gets the list of user groups for domain_name
:
root@server:~# groups domain_name
domain_name : domain_name mgrsecure
Based on their knowledge, I am entering the following commands in a terminal:
root@server:~# useradd -g domain_name -d /var/www/domain_name/data dev_2
root@server:~# passwd dev_2
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
root@server:~# usermod -a -G mgrsecure dev_2
Control:
root@server:~# groups dev_2
dev_2 : domain_name mgrsecure
When I try to go to the server as a user dev_2
, the server writes the following error:
$ ssh dev_2@server_ip
dev_2@server_ip's password:
Linux wth 3.2.0-4-amd64 #1 SMP Debian 3.2.65-1+deb7u2 x86_64
Could not chdir to home directory /var/www/domain_name/data: Permission denied
-bash: /var/www/domain_name/data/.bash_profile: Permission denied
dev_2@server:/$
What am I doing wrong?
What's the output of
ls -l /var/www/lider.top/data
? – Tom Yan – 2016-02-13T20:42:51.137@TomYan ls: cannot access /var/www/lider.top/data: Permission denied – Shilgen – 2016-02-14T09:37:57.173
Sorry I meant run it as root / with sudo. – Tom Yan – 2016-02-14T09:38:31.870
who (what user/group) owns /var/www/domain_name/data ? run the following command:
ls -l /var/www/domain_name/data
and tell us what user/group owns that folder. If you did not chown that directory, I am going to guess that file will be owned by root, which would make sense why you cannot write to that directory using your dev2 account. – Richie086 – 2016-02-14T10:29:34.907