Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newbie, Linux, Apache, I can't get permissions to ftp my server 2

Status
Not open for further replies.

lenpilot

IS-IT--Management
Feb 28, 2001
5
US
I have a new install of Red Hat 7.0 and Apache 1.3.14 But when I try to ftp the server I can only FTP as the username (I set up in the Red Hat Install) and then I can only write or modify the directory below my username. How can I change these permissions so I may modify files throughout the server via ftp?

Other servers (Cobalt Raqs) I use were already configured and I have never had to deal with this. This one is being built from scratch (my first) I know this newie question will probably make most of you shake your head in dissbelief, But I really can't find it anywhere.
 
Not positive on Red Hat, but with FreeBSD (another freeware Unix) you cannot FTP in as the root user. Instead you must set a user as a member of the Wheel group, FTP in as that user, and then run 'su' to upgrade your logon as super user (virtual root).

But for what you want to do ... dont use the root account to edit your pages. Instead set up a user that you want to have access to the web folders and then change the owner and permissions of the web folder and files (with the chmod and chown commands) so that the web administration account is can edit them.

I am not a strong Linux user (I stick mostly to FreeBSD), so you might get a better response in the Linus forum.
 
Switching to SU does not work. I can find no documentation anywhere that tells how to add a new user from the command prompt in apache 1.3.14 on Red Hat 7 HELP!!!!
 
You know what ... I feel like an idiot. You CANT switch to super user with FTP ... thats a terminal command used for Telnet!

But you dont need that anyways. You probably just want to set up your folder permission to allow the user(s) read/write access in the web folders/files. But that is a OS questions that would probably be best asked in the Linux forum.
 
My mistake! I thought this was just the apache forum not the windows/NT apache forum I apologise
 
This forum is not OS specific, but setting permissions uses OS functions. The Linux forum might be able to give you a better answer (since the users there know Linux in particular) ... but many of the users here probably use Linux too.

I personally use FreeBSD (another freeware Unix). The commands are probably the same, but I am not positive.

The commands you probably want to use are:
chmod to change file/folder permissions
chown to change file/folder owner.

Lets say your apache web folder is located at "/usr/local/apache/htdocs" and you have set up a user with the name "webmaster". You would want to go to the folder "/usr/local/apache" and run the command "chown webmaster htdocs". This would set the user "webmaster" as the owner of the folder htdocs. You will want to then set the folder permissions to make sure that the owner can add/change items in the htdocs but the world can only read its contents. To do this you would then run the command "chmod 744 htdocs". You will have to change directory into the htdocs folder and make the same owner/permission changes on any file/folders inside this directory or subdirectory for the "webmaster" to have the ability to change existing files/folders.
 
Thank you!!!!

My appologies for the previous snippy post! Something in that last advise you gave worked perfectly. I am eternally grateful Thanks.
 
My 2 cents:

I am performing the same duties with my Redhat Linux/Apache/FTP configuration. But the main difference in the way I am doing things is 'security'

I use OpenSSH2 with SFTP (secure FTP). This provides me with the ability to use an SFTP capable FTP client (such as secureFX from ww.vandyke.com) to securely transfer files to/from my server -
[red]without even needing an FTP server running on my box[/red]
The FTP transfer's ride directly on top of the encrypted SSH connection.

I learned my lesson the hard way on tightening security in the way I log into my machine and transfer files to/from it. My FTP/Apache server was compromised a few months back when a hacker broke into my machine via the FTPD. Since then, my system has been a lot more secure and less prone to break-ins.

I can assist in how to get SFTP working on your server if you need help. It's very easy/worth it. I HATE BEING A NEWBIE!
-grumpy smurf
 
From what I'm reading you can't upload FTP to anything or just that you have to FTP as a user and not as root?

It you are attempting to ftp as root you can do it one of two ways. First telnet into the system and then type su a the prompt. then you can manually ftp. or if you are ftp ing from another linux box and are logged in as root un gftp this is a graphical ftp program and does not care who you are.

good luck.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top