Hi All, On one of my servers I have a personal account and root. I disable root for ssh logins and run ssh on an alternative port. When 'scp'ing files I usually scp them up, then ssh in 'su' root and move them to /var/www/html. I can sftp I realize, but what group can I add my personal account to, but not root, so I can sftp in and put the files in /var/www/html? Secondarily /var/www/html/<my website> is owned by root:root, can I change this to something else so my sftp'ing is easier? apache:apache as owner? -Jason
On Sun, Jan 30, 2011 at 11:14 PM, Jason S-M <slackmoehrle.lists at gmail.com> wrote:> Hi All, > > On one of my servers I have a personal account and root. I disable root for ssh logins and run ssh on an alternative port. When 'scp'ing files I usually scp them up, then ssh in 'su' root and move them to /var/www/html. > > I can sftp I realize, but what group can I add my personal account to, but not root, so I can sftp in and put the files in /var/www/html?There are a dozen ways to do this. One is to uplodate with WebDAV over HTTPS, which is built into Apache on CentOS and has plenty of usable clients such as lftp. Another is simply to designate a directory under /var/www/html/, owned by you personally, that the apache user can browse. That give you direct upload access as yourself.
--On Sunday, January 30, 2011 8:14 PM -0800 Jason S-M <slackmoehrle.lists at gmail.com> wrote:> Secondarily /var/www/html/<my website> is owned by root:root, can I > change this to something else so my sftp'ing is easier? apache:apache as > owner?I would avoid giving the apache user write access to anything under /var/www/html unless it absolutely needs it. That prevents a rogue break-in through the web server from rewriting your web content and creating a back door into your system.
> > I can sftp I realize, but what group can I add my personal account to, but > not root, so I can sftp in and put the files in /var/www/html? >Adding to this: My son (who is 12) has his own domain now and is using iWeb to publish his website to an old server that I have. Well he is getting a fair number of visitors and is starting to expand his site and learn MySQL and PHP. So I want to move his domain to my CentOS box away from the Windows and IIS he is using now. No problem. I want him to publish over SFTP. 1. I can create him an account on the box 2. I can set him as the owner of his directory in /var/www/html/<his domain> My question is Would I make his users home directory /var/www/html/<his domain> so he automatically gets dumped there? -Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.centos.org/pipermail/centos/attachments/20110131/28386e58/attachment-0002.html>
Todd wrote:>> >> I can sftp I realize, but what group can I add my personal account to, >> but not root, so I can sftp in and put the files in /var/www/html? > > Adding to this: > > My son (who is 12) has his own domain now and is using iWeb to publish his > website to an old server that I have. Well he is getting a fair number of > visitors and is starting to expand his site and learn MySQL and PHP. > > So I want to move his domain to my CentOS box away from the Windows and > IIS > he is using now. No problem. > > I want him to publish over SFTP. > > 1. I can create him an account on the box > 2. I can set him as the owner of his directory in /var/www/html/<his > domain> > > My question is Would I make his users home directory /var/www/html/<his > domain> so he automatically gets dumped there?Have his profile cd there on login? mark