jonwatson

Well-Known Member
Apr 1, 2007
101
1
168
Hi All,

New to cPanel, but not new to control panels in general. I'm preparing to migrate a server from ISPConfig to cPanel, but I can't seem to get any joy out of the jailshell. When a jail a user, that user can no longer ls his directory or create files...seems he no longer has permissions to his own directory. This snippet is from one such user in his own home directory:
Code:
jailshell-3.00$ ls
ls: .: Permission denied
jailshell-3.00$ touch test
touch: cannot touch `test': No such file or directory
jailshell-3.00$ mkdir test
mkdir: cannot create directory `test': No such file or directory
jailshell-3.00$

Any ideas what's going on here?

Thanks!
 

david510

Well-Known Member
Aug 22, 2004
473
0
166
Get into the directory /home/virtfs/username/home/ from SSH and check the ownership and permission of the folder named username inside this directory. Make sure it has got the ownership username.username and permission 711.
 

jonwatson

Well-Known Member
Apr 1, 2007
101
1
168
Get into the directory /home/virtfs/username/home/ from SSH and check the ownership and permission of the folder named username inside this directory. Make sure it has got the ownership username.username and permission 711.

I think perhaps I was a little hasty. Things just started working after a while.
 

swapneel

Member
Oct 2, 2006
8
0
151
Hi,

Facing this same issue. The Permission denied was fixed after giving the correct ownership to the folder ''/home/virtfs/username/home/username". However, now when I try logging in via SSH and try accessing or listing any files I get nothing,

Code:
[[email protected] ~]$ ssh [email protected]
[email protected]'s password:
Last login: Thu Apr 19 21:34:03 2007 from server.hostname
-jailshell-3.00$ ls -al
total 0
-jailshell-3.00$ ls -al
total 0
-jailshell-3.00$
The shell has been set to ''/usr/local/cpanel/bin/jailshell'' in /etc/passwd. The prompt to isn't changing to [email protected]

This is happening for only one account. Also when I check the files in the user's home directory /home/username they are there.
 

SoftDux

Well-Known Member
May 27, 2006
1,023
5
168
Johannesburg, South Africa
cPanel Access Level
Root Administrator
Hi,

Facing this same issue. The Permission denied was fixed after giving the correct ownership to the folder ''/home/virtfs/username/home/username". However, now when I try logging in via SSH and try accessing or listing any files I get nothing,

Code:
[[email protected] ~]$ ssh [email protected]
[email protected]'s password:
Last login: Thu Apr 19 21:34:03 2007 from server.hostname
-jailshell-3.00$ ls -al
total 0
-jailshell-3.00$ ls -al
total 0
-jailshell-3.00$
The shell has been set to ''/usr/local/cpanel/bin/jailshell'' in /etc/passwd. The prompt to isn't changing to [email protected]

This is happening for only one account. Also when I check the files in the user's home directory /home/username they are there.


I'm having EXACTLY the same problem. I have recreated this user MANY times, and I still have a problem with his SSH access. Changing his SHELL to a normal shell works fine. The user can logon, and do whatever he needs to, but this isn't desired.

Code:
[[email protected] oostdco]# ll /home/virtfs/oostdco/
total 175
drwxr-xr-x   2 root root   4096 Aug 27 04:03 bin
-rwxr-xr-x   1 root root   1320 Sep 21 08:34 checkvirtfs
drwxr-xr-x  10 root root  13640 Sep 11 07:58 dev
drwxr-xr-x   4 root root   4096 Sep 19 11:52 etc
drwxr-xr-x   3 root root   4096 Sep 19 11:52 home
drwxr-xr-x  14 root root   4096 Sep  9 04:02 lib
dr-xr-xr-x 210 root root      0 Sep  7 18:41 proc
drwxrwxrwt  22 root root 141312 Sep 21 08:38 tmp
drwxr-xr-x  12 root root   4096 Sep 19 11:52 usr
drwxr-xr-x   6 root root   4096 Sep 19 11:52 var
[[email protected] oostdco]# ll /home/virtfs/oostdco/home/
total 4
drwx--x--x 0 oostdco oostdco 0 Sep 20 21:42 oostdco
[[email protected] oostdco]# ll /home/virtfs/oostdco/home/oostdco/
total 0
Looking at another account, which works with jailshell, I get this:

Code:
[[email protected] oostdco]# ll /home/virtfs/bonzai/
total 175
drwxr-xr-x   2 root root   4096 Aug 27 04:03 bin
-rwxr-xr-x   1 root root   1320 Sep 21 08:23 checkvirtfs
drwxr-xr-x  10 root root  13640 Sep 11 07:58 dev
drwxr-xr-x   4 root root   4096 Sep 21 08:23 etc
drwxr-xr-x   3 root root   4096 Sep 21 08:23 home
drwxr-xr-x  14 root root   4096 Sep  9 04:02 lib
dr-xr-xr-x 214 root root      0 Sep  7 18:41 proc
drwxrwxrwt  22 root root 141312 Sep 21 08:39 tmp
drwxr-xr-x  12 root root   4096 Sep 21 08:23 usr
drwxr-xr-x   6 root root   4096 Sep 21 08:23 var
[[email protected] oostdco]# ll /home/virtfs/bonzai/home/
total 4
drwx--x--x 36 bonzai bonzai 4096 Sep  3 08:30 bonzai
[[email protected] oostdco]# ll /home/virtfs/bonzai/home/bonzai/
total 120
lrwxrwxrwx  1 bonzai bonzai    32 Aug 15 02:21 access-logs -> /usr/local/apache/domlogs/bonzai
drwxr-xr-x  2 bonzai bonzai  4096 May 31 12:31 bin
drwxr-xr-x  2 bonzai bonzai  4096 May 29  2004 catalogs
drwxr-xr-x  4 bonzai bonzai  4096 Aug 15 02:14 cpanel3-skel
drwxr-xr-x  6 bonzai bonzai  4096 Aug 15 02:13 cpanelbranding
drwxr-x--- 17 bonzai mail    4096 Aug 15 02:13 etc
drwxr-xr-x  2 bonzai bonzai  4096 Mar  3  2007 fantastico_backups
drwxr-xr-x  2 bonzai bonzai  4096 Aug 15 02:13 images
drwx------  2 bonzai bonzai 20480 Sep  1 05:46 logs
drwxrwx--- 32 bonzai bonzai  4096 Aug 15 02:13 mail
drwxr-xr-x  8 bonzai bonzai  4096 Aug 15 02:14 php
-rwx------  1 bonzai bonzai 44881 Mar 19  2006 pkgacct
drwxr-xr-x  3 bonzai bonzai  4096 Aug 22 05:46 public_ftp
drwxr-x--- 23 bonzai nobody  4096 Sep 15 00:28 public_html
drwxr-xr-x  5 bonzai bonzai  4096 Aug 15 02:13 ruby
drwxr-xr-x  2 bonzai bonzai  4096 Aug 15 02:13 rvadmin
drwx------  9 bonzai bonzai  4096 Sep 16 16:00 tmp
lrwxrwxrwx  1 bonzai bonzai    11 Aug 15 02:21 www -> public_html
So, there's some files in /home/virtfs/bonzai/home/bonzai/ but NOT IN /home/virtfs/oostdco/home/oostdco/

Now, logged in as the user oostdco, with jailshell access, I get this:

Code:
-jailshell-3.1$ pwd
/home/oostdco
-jailshell-3.1$ ls -la
total 0
-jailshell-3.1$ pwd
/home/oostdco
-jailshell-3.1$ cd public_html
-jailshell: cd: public_html: No such file or directory
-jailshell-3.1$
Then, I change this users shell to Normal Shell, and get this:

Code:
[[email protected] ~]$ pwd
/home/oostdco
[[email protected] ~]$ ls -la
total 48
drwx--x--x   7 oostdco oostdco 4096 Sep 21 08:24 .
drwx--x--x 179 root    root    4096 Sep 21 08:15 ..
lrwxrwxrwx   1 oostdco oostdco   33 Sep 21 08:24 access-logs -> /usr/local/apache/domlogs/oostdco
-rw-r--r--   1 oostdco oostdco   24 Sep 21 08:15 .bash_logout
-rw-r--r--   1 oostdco oostdco  176 Sep 21 08:15 .bash_profile
-rw-r--r--   1 oostdco oostdco  124 Sep 21 08:15 .bashrc
-rw-------   1 oostdco oostdco   19 Sep 21 08:15 .contactemail
drwxr-xr-x   2 oostdco oostdco 4096 Sep 21 08:15 etc
drwxr-x---   5 oostdco mail    4096 Sep 21 08:40 mail
drwxr-xr-x   3 oostdco oostdco 4096 Aug 14 05:51 public_ftp
drwxr-x---   3 oostdco nobody  4096 Aug 14 05:51 public_html
drwxr-xr-x   6 oostdco oostdco 4096 Sep 21 08:24 tmp
lrwxrwxrwx   1 oostdco oostdco   11 Sep 21 08:15 www -> public_html
[[email protected] ~]$ cd public_html/
[[email protected] public_html]$ ll
total 4
drwxr-xr-x 2 oostdco oostdco 4096 Sep 21 08:15 cgi-bin
[[email protected] public_html]$

Any suggestions? It's only happening with ths one account, all other accounts are fine
 

VeZoZ

Well-Known Member
Dec 14, 2002
245
0
166
cPanel Access Level
DataCenter Provider
I just had this issue with a client account and I made a ticket about it. The customer is willing to wait so we can figure out what causes this. So hopefully cPanel can get to the bottom of this and it won't be happening in the future.