diff --git a/BackupPC.spec b/BackupPC.spec index e7c6668..57496f0 100644 --- a/BackupPC.spec +++ b/BackupPC.spec @@ -24,6 +24,7 @@ Source4: BackupPC_Admin.c Source5: backuppc.service Source6: BackupPC.tmpfiles Source7: README.RHEL +Source8: apache.users Patch0: BackupPC-4.1.3-docfix.patch @@ -216,6 +217,8 @@ install -p -m 0644 %{SOURCE1} \ %{buildroot}%{_sysconfdir}/httpd/conf.d/%{name}.conf install -p -m 0644 %{SOURCE2} \ %{buildroot}%{_sysconfdir}/logrotate.d/%{name} +install -p -m 0644 %{SOURCE7} \ + %{buildroot}%{_sysconfdir}/%{name}/ # perl-suidperl is no longer avaialable, we use a C wrapper mkdir -p %{buildroot}%{_datadir}/%{name}/sbin @@ -291,7 +294,7 @@ fi %doc README.md README.setup README.RHEL ChangeLog doc/* %license LICENSE %dir %attr(-,backuppc,backuppc) %{_localstatedir}/log/%{name} -%dir %attr(-,backuppc,backuppc) %{_sysconfdir}/%{name}/ +%dir %attr(-,backuppc,apache) %{_sysconfdir}/%{name}/ %config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}.conf %config(noreplace) %attr(-,backuppc,apache) %{_sysconfdir}/%{name}/* %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} diff --git a/README.setup b/README.setup index 501ebd9..761921d 100644 --- a/README.setup +++ b/README.setup @@ -5,7 +5,7 @@ For security reasons, backuppc user cannot log in. If you want to start manual backup (ie for debugging), you'll need to set it a shell : Permanent: -usermod -s /bin/bash +usermod -s /bin/bash backuppc or @@ -13,18 +13,20 @@ Temporary: su -s /bin/bash -l backuppc -Do not forget to create an SSH key (ssk-keygen) and copy it to remote computers -if you plan to use tar/rsync over SSH backup method. +Do not forget to create an SSH key (ssk-keygen) as the backuppc user and copy +it to remote computers if you plan to use tar/rsync over SSH backup method. The easiest way to do this (after logging in as the backuppc user) is to use ssh-copy-id +ssh-copy-id @ + + ## BackupPC's web interface The CGI web interface is located at : http://localhost/BackupPC You will need to create users in /etc/BackupPC/apache.users : -htpasswd -c /etc/BackupPC/apache.users username -(Note that the '-c' flag is only necessary to create the file) +htpasswd /etc/BackupPC/apache.users Once complete, add that user as an admin in config.pl: diff --git a/apache.users b/apache.users new file mode 100644 index 0000000..57dff0b --- /dev/null +++ b/apache.users @@ -0,0 +1,2 @@ +# You will need to create at least one user to be able to login +# htpasswd /etc/BackupPC/apache.users