|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
SSH - Password Protected Directory Issue
I dug myself a hole yesterday that I can't seem to get myself out of. In a very futile attempt to create a new FTP user with limited access via SSH, I inadvertently changed permissions for who knows what and now I am having a problem accessing password protected directories. When I enter the correct credentials, the log-in prompt keeps coming up each time I click the "OK" button. I'm sure a lot more information is required to assist me with this problem, but being a newbie, I'm not sure where to begin. Below is the bash history of what I did, but if anyone can lend a hand, just let me know what information is required in order to help me reverse the problem. Thanks in advance! Code:
id root ndn user ndn id ndn /usr/sbin/useradd -u 10076 -o -d /var/www/vhosts/mysite.com/custom_folder -g psacln -s /bin/false/ diva rockinrobin diva passwd diva id diva id ndn id ndn /usr/sbin/useradd -u 10076 -o -d /var/www/vhosts/mysite.com -g psacln -s /bin/false diva passwd diva useradd diva groupadd diva gpasswd -a diva diva chgrp -R groupnam /var/www/vhosts/mysite.com chgrp -R diva /var/www/vhosts/mysite.com chmod -R g+rw /var/www/vhosts/mysite.com chgrp -R root /var/www/vhosts/mysite.com chmod -R g+rw /var/www/vhosts/mysite.com sudo deluser diva chgrp -R owner /var/www/vhosts/mysite.com chown user:root /var/www/vhosts/mysite.com chown root /var/www/vhosts/mysite.com chown -R root * deluser diva groupdel diva userdel diva id diva chmod -R g-rw /var/www/vhosts/mysite.com chgrp -R root /var/www/vhosts/mysite.com chmod +R g+rw /var/www/vhosts/mysite.com chmod g+rw /var/www/vhosts/mysite.com chmod -R g-rw /var/www/vhosts/mysite.com id root chgrp -R root /var/www/vhosts/mysite.com chmod -R g-rw /var/www/vhosts/mysite.com chmod 2775 /var/www/vhosts/mysite.com chown root:root /var/www/vhosts/mysite.com chmod -R g-rw/var/www/vhosts/mysite.com chmod -R g-rw /var/www/vhosts/mysite.com chmod 2775 /var/www/vhosts/mysite.com ls -l chmod -R g+r /var/www/vhosts/mysite.com ls -alh cd mysite.com Last edited by pludi; 06-12-2012 at 10:33 AM.. |
| Sponsored Links | ||
|
|
#2
|
||||
|
||||
|
this isn't particularly easy to follow. perhaps the output of
ls -alh /var/www/vhosts/mysite.com . but likely you mean accessing folders via web-server, which sees .htpasswd but cannot read it. ensure the user/group which runs your httpd has permission to read it. sometimes this is user 'apache' or 'www-data'
edit: seems you changed to root:root, but only used recursive for the group, which you set g+r.. same with the 2755, wasn't done recursively (i believe new files would inherit group, but not your old ones). but probably your webserver isn't ran a root, i hope. so probably chgrp -R to correct group for webserver. Last edited by neutronscott; 06-12-2012 at 10:36 AM.. |
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Unzipping files <password protected> | anushree.a | Shell Programming and Scripting | 6 | 01-18-2010 03:51 AM |
| How to make script password protected | achararun | Shell Programming and Scripting | 11 | 12-26-2007 10:10 AM |
| Print on a printer which is password protected | Anuj | UNIX for Dummies Questions & Answers | 1 | 07-06-2005 01:44 PM |
| Creating a Password-Protected directory for ftp Uploads & Downloads | NAL | Security | 3 | 06-03-2002 05:20 PM |
| I inhereted a Unix server that is password protected...Help! | fxsaint | UNIX for Dummies Questions & Answers | 1 | 10-26-2000 08:12 PM |
|
|