Linux - NewbieThis 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!
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.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I'm new to linux admin. and have been thrown in the deepend at work. I have just set up CentOS 5.4 on a VPS to act as a webserver. I have added apache as the webserver and vsftp for ftping the files onto the server and set up virtual hosts so far so good.
However, when I upload files through the site I run into a problem, the files are owned by the 'apache' user. The website scripts are owned by 'user' (the account that ftp'd the files onto the server).
I assume that I cannot manipulate the uploaded files because the owner of the scripts and the owner of the files is different.
Can someone advise me what is the best way to address this problem.
I'm still confused though - The files are being uploaded by a file upload form in the website. Am I correct in thinking that I cannot delete /alter the files on the server using php if the php script owner is different from the uploaded files owner?
If so what settings can I use to make sure that the files are set to the same owner as the website scripts or do I have to put apache and user in the same group?
Also, is there a way to set default permissions that are automatically applied to any files that are uploaded to a particular directory?
Thanks for your reply, I have no idea what you mean when you say 'uploading to the apache document and CGI dirs'
I need to know more about how services are run on the OS with relation to the user and group policy etc. Specifically, the owner of the php scripts is 'user' and 'user' belongs to the group 'user'. Apache runs as user 'apache' and is part of the group 'apache'.
I used usermod to add the 'apache' user to the group 'user'. I also used chmod so that all files uploaded to the upload directory are in the group 'user'. (not figured out how to automatically set the rwx permissions on uploaded files yet).
What I think I need to know is, who is the user for a web request? ie. does a php script run as user 'apache' or as the user that owns the document on the OS? Obviously, a web user is not connecting to the server as 'user' so are php scripts run as 'apache' user?
Any articles about webservers, uploads and security that people are aware of would be very useful.