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!
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.
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.
I have a CentOS install with a single website installed and working properly under /var/www/domainname/public_html
installed there is a copy of Invision Power Board, which has a new auto-update feature that uses a FTP connection to automatically install the updated files, etc.
The problem is the only FTP I have been able to set up is via my user account (lets call it user1), and that uploads by default to: /home/user1/ftp
Not only that, but after uploading those files I need to chown them to apache and chmod them as required by the forums, then set chcon for the selinux security etc before those files will be usable by apache.
So my question is, is there a way to set FTP up in such a way as to do all of that automatically for a specific user account to handle forum upgrades? If so, can someone kick me in the right direction please?
Or you could instead run inotify and have an incron job watch the directory for new files and run a shell script to carry out the modifications you need. That works with small numbers of files coming in slowly.
Hi Guys,
I have a CentOS install with a single website installed and working properly under /var/www/domainname/public_html
installed there is a copy of Invision Power Board, which has a new auto-update feature that uses a FTP connection to automatically install the updated files, etc. The problem is the only FTP I have been able to set up is via my user account (lets call it user1), and that uploads by default to: /home/user1/ftp
Not only that, but after uploading those files I need to chown them to apache and chmod them as required by the forums, then set chcon for the selinux security etc before those files will be usable by apache.
So my question is, is there a way to set FTP up in such a way as to do all of that automatically for a specific user account to handle forum upgrades? If so, can someone kick me in the right direction please?
Aside from the spot-on advice Turbocapitalist gave you, I'll offer up one more bit of direction: do it like you're doing it now. Circumventing security, uploading directly to the webservers root, etc., are *NOT* good things. Transfer the file(s) to a temp directory under user1 home, and move them to production from there. Also, consider using something like SVN or Git so you can version these files, and roll back if necessary.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.