backup operation: back up the files belong to www-run
- From: 张韡武 <zhangweiwu@xxxxxxxxxx>
- Date: Sat, 28 Oct 2006 20:25:17 +0800
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?
.
- Follow-Ups:
- Prev by Date: Re: ten free SysAdmin tools
- Next by Date: Re: ten free SysAdmin tools
- Previous by thread: ten free SysAdmin tools
- Next by thread: Re: backup operation: back up the files belong to www-run
- Index(es):
Relevant Pages
|