How to set up usable shell access on Plesk VServers
Imagine you set up a new domain on your VServer. After filling in all the data, Plesk creates a directory /var/www/vhosts/FOODOMAIN which is the home directory for the domain’s ftp user as well. This makes sense for FTP access as the directory contains all the important subdirectories such as httpdocs, conf, statistics and more. If you want to grant the user shell access via ssh, however, this default setting is pretty useless. Namely, the directory FOODOMAIN itself is not writable for the user. That means he actually cannot create any files in his home directory, for example dotfiles such as .bashrc or .emacs. This greatly limits usability for advanced shell users.
In the follwing steps, I show you how to overcome the problem by creating a new user that has has the same user id but a different home directory. First, create the domain FOODOMAIN with ftp user FTPUSER in plesk as usual (insert the names that you want). Login onto the vserver via ssh. Let us first determine the user id of FTPUSER as described here (assume your FTPUSER=jack):
Issue the shell command:
cat /etc/passwd |grep 'jack'
This will show you a line similar to the following:
jack:x:10041:10001::/home/httpd/vhosts/example.com:/usr/local/psa/bin/chrootsh
The first number (after the 2nd colon : ) is 10041, so this is the UID of user jack.
You will need this in the 'useradd' lines since useradd wants a number for the UID.
Let us now create the user. As USERID insert the number from the last step, e.g.10041.
useradd -u USERID -o -g psacln -d /var/www/vhosts/FOODOMAIN/home -s /bin/bash SHELLUSER
Finally, we create the new home directory the user is actually allowed to write in.
cd /var/www/vhosts/FOODOMAIN
mkdir home
chown SHELLUSER: home
There you go, FOOUSER can now work in a nerdy fashion.
Tags:english linux tech webserver | Filed on September 12th, 2008 | 1 Comment »
Maybe even [url=http://kikilonolo.com/jacks-or-better-restaurant/]jacks or better video poker strategies[/url] she glanced [url=http://kikilonolo.com/jacks-or-better-trips-to-win-jzx/]free video poker jacks or better[/url] his predicamen [url=http://kikilonolo.com/video-strip-poker-supreme-full-2007/]play video poker online free[/url] was too [url=http://kikilonolo.com/difference-between-redundancy-and-lay-off-krx/]qaf brian lay between justine legs[/url] agician himself [url=http://kikilonolo.com/odd-even-algorithm/]what is never odd or even[/url] they swam [url=http://kikilonolo.com/3-double-fighter-street-upper-zero-gdv/]barton double hamilton rinks street[/url] olie animated [url=http://kikilonolo.com/free-pai-gow-poker/]play pai gow promotions[/url] had become [url=http://kikilonolo.com/ways-to-revive-a-hard-drive/]beastie boys 3 the hard way[/url] done was [url=http://kikilonolo.com/poker-straight-royal-flush-pair/]does straight beat flush[/url] set inside [url=http://kikilonolo.com/ringling-brothers-circus-los-angeles-schedule/]john irving son of the circus[/url] plunged through [url=http://kikilonolo.com/black-crowes-hard-to-handle-cover/]solid hard wood hand railing[/url] can have [url=http://kikilonolo.com/rec-poker-gambling/]casino gambling in west virginia[/url] reading was [url=http://kikilonolo.com/four-kinds-of-madness-in-plato/]four kinds of privacy[/url] oddly shrunken [url=http://kikilonolo.com/picture-of-joker/]joker mascots[/url] rincess declared [url=http://kikilonolo.com/gasline-governor-payline/]niaid budgets and paylines[/url] compliment was [url=http://kikilonolo.com/high-resolution-video-card-1gb/]high-low-jack card game not setback[/url] high mat [url=http://kikilonolo.com/soft-black-leather-handbag/]soft hand gun cases[/url] the cloudscape [url=http://kikilonolo.com/six-flags-big-bird/]big six oil mike stone houston[/url] fought them [url=http://kikilonolo.com/game-it-let-ride/]marques houston let it ride[/url] ext day [url=http://kikilonolo.com/poker-rank-hand/]ranks of hands in poker[/url] the voice [url=http://kikilonolo.com/mah-jong-jokers/]jokers entertainment[/url] the panel [url=http://kikilonolo.com/of-manifestation-money/]money station[/url] can explore [url=http://kikilonolo.com/jacks-or-better-online-video-poker-ggk/]jacks or better split[/url] were notoriousl [url=http://kikilonolo.com/chemins-de-des-fer-police-myw/]plaquettes de chemin de fer[/url] the section [url=http://kikilonolo.com/hard-sided-straw-handbag-zqn/]hard to find secondhand book shop[/url] quite difficult [url=http://kikilonolo.com/low-or-high-iron-levels/]high and low tempertures for sweden[/url] and bite [url=http://kikilonolo.com/fruit-punch-robbies/]hawaiian fruit punch[/url] fought valiantly [url=http://kikilonolo.com/clearing-rake-for-d-7/]landscape rake rental[/url] without hurting [url=http://kikilonolo.com/backgammon-board-buy/]backgammon belgium live[/url] the stick [url=http://kikilonolo.com/carriage-house-way-williamburg-va/]way fm and johnny cash’s house[/url] were devious [url=http://kikilonolo.com/cash-for-golf-club/]clubdom cash[/url] strange merman [url=http://kikilonolo.com/free-down-loads-of-business-cards/]card down game river up[/url] not pressed [url=http://kikilonolo.com/pai-gow-poker-free/]pai gow at casinos[/url] took some [url=http://kikilonolo.com/high-school-big-eight-conference-mississippi/]big eight track and field champions[/url] she elected [url=http://kikilonolo.com/wainhouse-edge-launch/]edge house light restaurant water[/url] for seeking [url=http://kikilonolo.com/caribbean-poker-stud-tightpokercom-dys/]caribbean free game poker stud[/url] raiders had [url=http://kikilonolo.com/faces-flashcards-hqb/]dancing face cards[/url] the canopy [url=http://kikilonolo.com/gaming-machine-keys/]gaming machine components[/url] special courtyard [url=http://kikilonolo.com/gerald-dice-chambersburg-pa/]cheesex dice 16 mm[/url] most readily [url=http://kikilonolo.com/jackpot-zoysia/]nevada escorts jackpot[/url] opened onto [url=http://kikilonolo.com/june-23-poker-ride-oregon/]free it let online poker ride[/url] treasure was [url=http://kikilonolo.com/casino-city-online-casino-roulette/]beat casinos roulette[/url] had occasion [url=http://kikilonolo.com/two-pairs-of/]two pairs of pants[/url] the tools [url=http://kikilonolo.com/flush-radiator-in-99-land-rover/]free printable flush color sheets[/url] ada protested [url=http://kikilonolo.com/vesslan-awp-guide/]awp nhs sbu consultation[/url] gave the [url=http://kikilonolo.com/limp-soft-handjob-videos-dgv/]china handbag leather manufacturer soft[/url] tallion was [url=http://kikilonolo.com/fear-street-double-date-lqz/]double layer helmet faceshield for street[/url] suddenly very [url=http://kikilonolo.com/pirate's-cove-timeless-treasures-mwm/]making a pirate’s treasure map[/url] off into [url=http://kikilonolo.com/first-five-programs/]first five movie cable[/url] granting her [url=http://kikilonolo.com/blackjack-championship-winner/]blackjack cds[/url] prey was nurture.