Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
03-01-2005, 01:21 PM
|
#1
|
Member
Registered: Feb 2005
Distribution: debian sarge
Posts: 113
Rep:
|
help with debian webadmin user
Hi guys - here's a newbie question for you....
(but im not quite a newbie - i just never solved it )
....it's probably dead simple...
I have 2 remote debian servers that I use to host websites.
I would like to be able to sftp in to both and upload files to any of the web directories on them with one user account, but I have disabled root login.
I would like to know how to set up a user that will automatically have admin access to any web directory as I create them using a web-based gui admin system.... (I use webmin on one box and 42goISP on the other).
I have just muddled my way through so far (for 4 years!), by changing the owner of the directories manually after I have added them using the gui, (or adding my admin user to each group that is created in the case of 42goisp) but this Im sure will screw up if i ever try to do anything to them with the gui again, since they are originally owned by www-data.
(which by the way I am intrigued by - how do you find out what www-data s password is? and if you change it, does apache and everything else that uses it break?)
-42goisp has all website directories that it creates owned by www-data with a unique group (ie: web22).....
-webmin seems to just create em with ownership as www-data.www-data
Anyone got a simple group/user solution that will help me out without exposing my boxes to too much security risk?
PS Actually I never really solved this problem with the raq i had before these either - I just broke the gui then also... the problem arose because the gui would set every new website to be owned by a new user, when really I wanted to own them all (or at least have the rights to them) myself.
sorry if im rambling - i realise i have 2 different problems here, but i would welcome some useful input as i am unable to google anything of much use...
Thanks
|
|
|
03-01-2005, 04:07 PM
|
#2
|
Member
Registered: Feb 2005
Distribution: Debian FC4 LFS Slackware
Posts: 174
Rep:
|
You say you have disabled root logins, so how do you elevate your privileges? su,sudo,super?
nz
|
|
|
03-01-2005, 05:15 PM
|
#3
|
Member
Registered: Feb 2005
Distribution: debian sarge
Posts: 113
Original Poster
Rep:
|
generally su - why?
|
|
|
03-01-2005, 06:01 PM
|
#4
|
Member
Registered: Feb 2005
Distribution: Debian FC4 LFS Slackware
Posts: 174
Rep:
|
If www-data is a user, what happens when you su www-data?
nz
|
|
|
03-02-2005, 03:17 AM
|
#5
|
Member
Registered: Feb 2005
Distribution: debian sarge
Posts: 113
Original Poster
Rep:
|
...i get asked for a password (which i don't know -see above) - this was something I was wondering about; wether I could use www-data as my super-user; but i've seen stuff that recomends against it, cause it has too much privilege (but maybe by that they mean it can access all the websites - which I would put up with :-) )
|
|
|
03-02-2005, 08:20 PM
|
#6
|
Member
Registered: Feb 2005
Distribution: Debian FC4 LFS Slackware
Posts: 174
Rep:
|
I su to user 'postgres' to do maintenance of postgresql databases, and postfix allows you to su to user 'postfix'. I can't help you with the password as I am not sure whether it would be your root password, your normal user password, or the 'www-data' password whatever that might be. I am thinking that if you are a member of the www-data group it would be your user password, unless you (or the installation) set a password for user 'www-data'. Wish I could be more help right now. Got to do more research.
nz
|
|
|
03-02-2005, 08:40 PM
|
#7
|
Member
Registered: Mar 2004
Location: Meersburg (GER)
Distribution: Cygwin,RH 7.2 7.3, SuSe 6.4 8.2 9.1,TinyLinux, Debian Sarge, Knoppix 3.*, Knoppicilin, Knoppix STD
Posts: 191
Rep:
|
have you tried
su -
and then from your root account su to your user
if I remember correctly
i do not need a password to su from a superuser (root) to a normal user
|
|
|
03-03-2005, 03:15 AM
|
#8
|
Member
Registered: Feb 2005
Distribution: debian sarge
Posts: 113
Original Poster
Rep:
|
the main thing i want to be able to do is to (s)ftp files into all the website directories as one suitable user (convenient for me, and giving a secure-ish ownership of these files) - what i want to know is how this user should be setup....
- it's not so much what to do when I login via putty - i'm ok with that....
|
|
|
03-03-2005, 06:00 AM
|
#9
|
Member
Registered: Feb 2005
Distribution: Debian FC4 LFS Slackware
Posts: 174
Rep:
|
I believe you already have the tools to do this without making any changes to the system, just have to figure out the right sequence of commands.
nz
|
|
|
03-04-2005, 07:46 PM
|
#10
|
Member
Registered: Feb 2005
Distribution: Debian FC4 LFS Slackware
Posts: 174
Rep:
|
In webmin change the password of user www-data to something you know. This should allow you to do all the maintenance you need without adding or breaking anything.
nz
|
|
|
03-04-2005, 08:28 PM
|
#11
|
Senior Member
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100
Rep:
|
Root can't find out the password of user accounts, but it can change the password to be anything you want. As root, just type That will ask you for a new pasword for www-data, and you'll be good. Also to get the sftp happening, make www-data the owner of the /var/www directory, and you should be able to get to it through ftp. That may mess up your security in other ways, but making it so you can ftp the files into the correct place is trivial, just set the ownership of the location to the account you want to use while ftping, and you're set.
Peace,
JimBass
|
|
|
All times are GMT -5. The time now is 07:03 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|