backup operation: back up the files belong to www-run



Hello. I need to decide how to back up my web server from my office. The
webserver is in the datacenter far away. Among all files that needs to
be backed up, a lot of them are owned by www-run and have permission of
600, these files are uploaded by the web visitors.

My idea is I can run a script in crontab, on the desktop in my office,
that connects to the web server through ssh and fetch files I need to
back up. This script connects to the web server as a normal user, but
then the script cannot read the files web visitors uploaded (permission
denied). So far I thinked about 4 methods I can solve this problem, I
want to share these ideas with experienced users on the group and listen
to your suggestions;)

1: I try to set proper umask so that the files uploaded by visitors
automatically have permission like 644. This way my backup script do
have permission to read these files.

2: I try to let my backup script connect to the webserver as root. The
webserver forbids root login, thus I may need to configure sshd to allow
root login.

3: I try to use 'sudu', connect to the webserver as a normal user and
'sudo' to root to fetch the files.

4: I try to let my backup script connect to webserver as user 'www-run'.
To do so I need to give www-run user login permission, by changing its
login shell from /bin/false to /bin/bash.

so, which idea do you think is better? Any suggestions?
.



Relevant Pages

  • Re: backup operation: back up the files belong to www-run
    ... then the script cannot read the files web visitors uploaded (permission ... I try to let my backup script connect to the webserver as root. ... webserver forbids root login, thus I may need to configure sshd to allow ...
    (comp.os.linux.security)
  • [SLE] (with better English) Re: [SLE] backup operation: back up the files belong to www-run
    ... There are a lot of files created by www-run ... permission is 600. ... The backup script run in my office desktop, ... I need to decide how to back up my web server from my office. ...
    (SuSE)
  • New webserver
    ... This web server is on a LAN with SBS 2003. ... This new webserver is serving our corporate web site. ... You do not have permission to view this directory or page ...
    (microsoft.public.windows.server.sbs)
  • Re: nobody using sudo -- scary!
    ... don't run your webserver as "nobody". ... If this web server is tightly controlled and only used for controlling ... it permission to run that script. ...
    (comp.lang.perl.misc)
  • Re: design issue - embedded webserver application
    ... A webserver should run on the SBC so that the system can be configured ... using some scripts embedded in html which the webserver then parses ... or suggestions about which technologies to use (cgi for interface? ... trivial learning curve if you don't know what a web server really does ...
    (comp.arch.embedded)