#1  
Old 26th November 2011, 22:59
wyattbiker wyattbiker is offline
Member
 
Join Date: Mar 2011
Posts: 33
Thanks: 0
Thanked 4 Times in 2 Posts
Default bashrc and default home dir

When a user logs in with SSH they are landed in a directory like this

Code:
/var/www/clients/client6/web7
1) Where does the .bashrc go? I tried putting it in the web7 directory but seems not to take effect.

I am using this as .bashrc (Copied from root):
Code:
# .bashrc

# User specific aliases and functions

alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'

# Source global definitions
if [ -f /etc/bashrc ]; then
	. /etc/bashrc
fi

#2) After logging in is there a way to put them in their symlink home directory instead. E.g.

Code:
/var/www/domainname.com
Thanks
Reply With Quote
Sponsored Links
  #2  
Old 27th November 2011, 02:18
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,490
Thanks: 835
Thanked 5,525 Times in 4,346 Posts
Default

1) The shell of jailed users is the jailkit shell, I'am not sure if its reads the .bashrc file as .bashrc is a configuration file of the bash shell. See also here for modifications like a different in jail shell:

http://olivier.sessink.nl/jailkit/jk_chrootsh.8.html

2) Not as far as I know. But a jailed user cant see this path as the dircetory /var/www/clients/client6/web7/ is the directory / for him, so he neither sees /var/www/domainname.com nor /var/www/clients/client6/web7 in that case.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 27th November 2011, 18:12
wyattbiker wyattbiker is offline
Member
 
Join Date: Mar 2011
Posts: 33
Thanks: 0
Thanked 4 Times in 2 Posts
Default

The user is not jailed. I set up his Chroot Shell account to None.

It seems the Shell User Options Tab has no effect when you change the paths.

The only way I got it to work was to manually change the path of the user in the /etc/passwd file
Reply With Quote
  #4  
Old 27th November 2011, 18:22
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,490
Thanks: 835
Thanked 5,525 Times in 4,346 Posts
 
Default

Please be aware that your setup will break now if the name of the domain is changed in the website settings. To prevent that, ISPConfig uses a path that does not change like /var/www/clients/client6/web7 for websites and shell users.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
Reply

Bookmarks

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 On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 20:18.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.