#1 (permalink)  
Old 04-01-2007, 08:18 PM
Registered User
 
Join Date: Apr 2007
Posts: 98
jonwatson is on a distinguished road
Jailshell Doesn't Allow 'ls'

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!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-02-2007, 05:28 AM
Registered User
 
Join Date: Aug 2004
Posts: 468
david510 is on a distinguished road
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-09-2007, 12:27 PM
Registered User
 
Join Date: Apr 2007
Posts: 98
jonwatson is on a distinguished road
Quote:
Originally Posted by david510 View Post
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-10-2007, 01:10 AM
Registered User
 
Join Date: Aug 2004
Posts: 468
david510 is on a distinguished road
When the issue with the jail shell persists a reboot of the server should solve it.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-19-2007, 11:57 PM
Registered User
 
Join Date: Oct 2006
Posts: 8
swapneel is on a distinguished road
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:
[digen@redux ~]$ ssh username@domain.com
username@domain'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 username@serverhostname.

This is happening for only one account. Also when I check the files in the user's home directory /home/username they are there.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 08-30-2007, 05:37 AM
Registered User
 
Join Date: Jul 2007
Posts: 3
Danijell is on a distinguished road
Ssh

Hi,

When login with problematic user type "pwd" and copy here the output.







Danijel,
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 09-21-2007, 01:43 AM
Registered User
 
Join Date: May 2006
Location: Johannesburg, South Africa
Posts: 542
SoftDux is an unknown quantity at this point
Quote:
Originally Posted by swapneel View Post
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:
[digen@redux ~]$ ssh username@domain.com
username@domain'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 username@serverhostname.

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:
[root@gandalf 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
[root@gandalf oostdco]# ll /home/virtfs/oostdco/home/
total 4
drwx--x--x 0 oostdco oostdco 0 Sep 20 21:42 oostdco
[root@gandalf oostdco]# ll /home/virtfs/oostdco/home/oostdco/
total 0
Looking at another account, which works with jailshell, I get this:

Code:
[root@gandalf 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
[root@gandalf oostdco]# ll /home/virtfs/bonzai/home/
total 4
drwx--x--x 36 bonzai bonzai 4096 Sep  3 08:30 bonzai
[root@gandalf 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:
[oostdco@gandalf ~]$ pwd
/home/oostdco
[oostdco@gandalf ~]$ 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
[oostdco@gandalf ~]$ cd public_html/
[oostdco@gandalf public_html]$ ll
total 4
drwxr-xr-x 2 oostdco oostdco 4096 Sep 21 08:15 cgi-bin
[oostdco@gandalf public_html]$

Any suggestions? It's only happening with ths one account, all other accounts are fine
__________________
  • cPanel :: Fantastico :: RVSkin :: WHM :: ModernBill
  • Reseller Hosting :: SSL Certificates :: Domain Registrations :: Affiliate Program
  • Blog Hosting :: CMS Hosting :: Forum Hosting :: E-Commerce Hosting
SoftDux- The Leaders in Software
Use the coupon: cpanel-06 to get 20% off our packages
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 09-21-2007, 09:15 AM
cpanelkenneth's Avatar
cPanel Development
 
Join Date: Apr 2006
Posts: 3,503
cpanelkenneth will become famous soon enough cpanelkenneth will become famous soon enough
Please open a support ticket.

https://tickets.cpanel.net/submit/
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 10-20-2007, 06:01 PM
Registered User
 
Join Date: May 2007
Posts: 50
mstuebner is on a distinguished road
Quote:
Originally Posted by cpanelkenneth View Post
Please open a support ticket.

https://tickets.cpanel.net/submit/
I have something similar. The home dir in virtfs/user/home/user is just empty. Is there any way I can recreate those (hard?) links to make it working?

WHM 11.11.0 cPanel 11.15.0-R17665
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 10-31-2007, 08:38 PM
Registered User
 
Join Date: Dec 2002
Posts: 158
VeZoZ
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #11 (permalink)  
Old 09-29-2009, 05:05 AM
Registered User
 
Join Date: Jan 2006
Posts: 2
mynameanu is on a distinguished road
This happens from time to time, and it is really easy to fix, simply umount the entire virtfs directory, then log back in to the SSH user, and it will be fine;

root@server [~]# umount /home/virtfs/<user>/home/<user>/
root@server [~]#
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 01:54 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
© cPanel Inc