Re: Fresh install (ubuntu) permissions issues
[email protected] Sat, 30 May 2026 13:06:36 -0400
| Newsgroups | gmane.comp.sysutils.backup.backuppc.general |
|---|---|
| Message-ID | <[email protected]> |
--===============4981341281190167450==
Content-Type: multipart/alternative;
boundary=eaf79cb21472b89d118d2c5ca43843200b7bf7b0
--eaf79cb21472b89d118d2c5ca43843200b7bf7b0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
I've done a lot of digging into this, and while I have not solved it yet=
, I want to document in case anyone else runs into this problem and find=
s this through archives of this mailing list.
First off, this is an issue introduced with the recently released Ubuntu=
26.04 LTS. I fired up a spare machine that had 24.04 LTS running on it=
, and all I had to do was "sudo apt install apache2" and "sudo apt insta=
ll backuppc", start both with systemctl and was instantly up and running=
, with no problems modifying the configuration files. If I don't get th=
is figured out I may just go and load 24.04 on my backuppc server box, b=
ut would prefer to be more up to date.
As of last weekend, I was thinking there had been a disk error since mou=
nting an external file system allowed things to work. The revision to t=
he /usr/share/backuppc/lib/BackupPC/Storage/Text.pm file, which I did ba=
sed on this search find: Can not edit config.pl and open log file in web=
Interface =C2=B7 Issue #188 =C2=B7 backuppc/backuppc <https://github.co=
m/backuppc/backuppc/issues/188> provided a more expansive error message =
indicating that the file system was read-only:
---
TextFileWrite: Failed to write /etc/backuppc/localhost.pl.new (errno =3D=
Read-only file system, uids =3D 33,113, gids =3D 33 33,33 33, umask =3D=
027, ver =3D v5.40.1, prog =3D /usr/bin/perl)
---
(note uid and gid 33 are both www-data and uid 113 is backuppc).
So I went down a rabbit hole of disk diagnostics. Smartmontools indicat=
ed I *may* have a problem, even though the disk "passed" so I reformatte=
d the partition with mkfs flags that ran a destructive badblocks command=
(writes to every block multiple times to cause any bad blocks to get re=
mapped). Yes, excessive. Took days to run. Reinstalled everything (no =
indications of any bad blocks this time around), and I got the exact sam=
e results. =20
---
username@backuppc:/mnt$ ls -la /etc/backuppc/
total 212
drwxrwxr-x 2 backuppc www-data 4096 May 29 09:24 .
drwxr-xr-x 142 root root 12288 May 29 10:24 ..
-rw-r----- 1 backuppc backuppc 0 May 30 11:00 LOCK
-rw-r--r-- 1 backuppc www-data 835 May 29 09:24 apache.conf
-rw-rw-r-- 1 backuppc www-data 88554 Feb 2 15:19 config.pl
-rw-rw-r-- 1 backuppc www-data 88392 Feb 2 15:19 config.pl.sample
-rw-rw-r-- 1 backuppc www-data 2243 Feb 2 15:19 hosts
-rw-rw-r-- 1 backuppc www-data 2243 Feb 2 15:19 hosts.sample
-rw-r----- 1 backuppc www-data 47 May 29 09:09 htpasswd
-rw-rw-r-- 1 backuppc www-data 427 Feb 2 15:19 localhost.pl
lrwxrwxrwx 1 root root 13 May 28 22:46 pc -> /etc/backuppc
username@backuppc:/mnt$ ls -la /mnt/sdb2
total 220
drwxrwxr-x 3 backuppc www-data 4096 May 29 09:24 .
drwxr-xr-x 3 root root 4096 May 30 11:13 ..
-rw-r----- 1 backuppc backuppc 0 May 30 11:00 LOCK
-rw-r--r-- 1 backuppc www-data 835 May 29 09:24 apache.conf
-rw-rw-r-- 1 backuppc www-data 88554 Feb 2 15:19 config.pl
-rw-rw-r-- 1 backuppc www-data 88392 Feb 2 15:19 config.pl.sample
-rw-rw-r-- 1 backuppc www-data 2243 Feb 2 15:19 hosts
-rw-rw-r-- 1 backuppc www-data 2243 Feb 2 15:19 hosts.sample
-rw-r----- 1 backuppc www-data 47 May 29 09:09 htpasswd
-rw-rw-r-- 1 backuppc www-data 427 Feb 2 15:19 localhost.pl
drwx------ 2 root root 16384 May 30 11:12 lost+found
lrwxrwxrwx 1 root root 13 May 28 22:46 pc -> /etc/backuppc
username@backuppc:/mnt$ sudo umount /mnt/sdb2
username@backuppc:/mnt$ sudo mount /dev/sdb2 /etc/backuppc
username@backuppc:/mnt$ ls -la /etc/backuppc/
total 228
drwxrwxr-x 3 backuppc www-data 4096 May 29 09:24 .
drwxr-xr-x 142 root root 12288 May 29 10:24 ..
-rw-r----- 1 backuppc backuppc 0 May 30 11:00 LOCK
-rw-r--r-- 1 backuppc www-data 835 May 29 09:24 apache.conf
-rw-rw-r-- 1 backuppc www-data 88554 Feb 2 15:19 config.pl
-rw-rw-r-- 1 backuppc www-data 88392 Feb 2 15:19 config.pl.sample
-rw-rw-r-- 1 backuppc www-data 2243 Feb 2 15:19 hosts
-rw-rw-r-- 1 backuppc www-data 2243 Feb 2 15:19 hosts.sample
-rw-r----- 1 backuppc www-data 47 May 29 09:09 htpasswd
-rw-rw-r-- 1 backuppc www-data 427 Feb 2 15:19 localhost.pl
drwx------ 2 root root 16384 May 30 11:12 lost+found
lrwxrwxrwx 1 root root 13 May 28 22:46 pc -> /etc/backuppc
username@backuppc:/mnt$
---
Here I check the permissions of /etc/backuppc as it exists on the main f=
ile system (note, I had already added write permissions to group to seve=
ral of the files in this directory but that didn't solve anything. As y=
ou can see, the permissions of the /etc/backuppc directory are drwxrwxr-=
x backuppc www-data (rw for both the user and group). And the config =
files, other than apache.conf and htpasswd are also rw for both user (ba=
ckuppc) and group (www-data).
Then I mounted a file system to which I had previously copied over the c=
ontents of /etc/backuppc, using rsunc to preserve all attributes ("sudo =
rsync -av /etc/backuppc/ /mnt/sdb2"). I had temporarily mounted this at=
/mnt/sdb2 to do the copying. I unmounted it from there and then mounte=
d it on /etc/backuppc. As you can see, it had the exact same contents a=
nd permissions (plus it had a lost+found directory).
Using the "native" /etc/backuppc, I got the "failed to write" error. Af=
ter mounting the separate-disk /etc/backuppc I got no error message.
I have tried G.W.'s suggestion to change $Conf{UmaskMode} in BackupPC's =
config.pl to 007 from 027 but this made no difference.
Both G.W. and tomas's suggestion that this is apparmor causing problems,=
but I dug into that and it doesn't look like there is any problems. I =
searched the logs running "sudo journalctl | grep apparmor | grep backup=
pc" and got nothing other than "backuppc being the name of the computer.=
I also looked through /etc/apparmor.d directory and there is nothing t=
here for apache2 nor backuppc.
So I am still stuck. I must be the first person to try to install backu=
ppc on the new Ubuntu, or else everyone else is way smarter than me and =
figured this out on their own. Maybe I should file a bug report with Ubu=
ntu.
On Mon, May 25, 2026, at 11:36 AM, G.W. Haywood wrote:
> Hi there,
>=20
> On Sun, 24 May 2026, backuppc@sundquist... wrote:
>=20
> > ...
> > I reinstalled Apache2 and backuppc.
> > ...
>=20
> That was probably excessive. Did you see my private mail?
>=20
> 8<--------------------------------------------------------------------=
--
>=20
> Date: Fri, 15 May 2026 08:59:25 +0100 (BST)
> From: G.W. Haywood <[email protected]>
> To: [email protected]
> Subject: Re: Fresh install (ubuntu) permissions issues
>=20
> 8<--------------------------------------------------------------------=
--
>=20
> > One commenter ... had SELinux running and had to write a policy
> > ... I don't have SELinux running.
>=20
> On Ubuntu I think it's more likely to be AppArmor than SELinux.
>=20
> > ... One respondent provided some code to add to .../Storage/Text.pm
> > to get more info on the error. I did this and got ...
> > ---
> > TextFileWrite: Failed to write /etc/backuppc/localhost.pl.new \
> > (errno =3D Read-only file system, uids =3D 33,113, gids =3D 33 33,33=
33,
> > umask =3D 027, ver =3D v5.40.1, prog =3D /usr/bin/perl)
> > ---
> > ...
> > ... the read-only file system message, .. didn't make sense ...
>=20
> Unless there really is a problem with the filesystem, which is quite
> possible but seems to me unlikely, I wonder if that might just be a
> misleading error message. Can you point me to the code that you used
> to modify your Text.pm?
>=20
> > ... plugged in an external drive with a fresh ext4 partition. Did a
> > temporary mount and copied over the contents of /etc/backuppc, then
> > remounted it at /etc/backuppc.
> >=20
> > And it worked! So I must have some bad blocks where /etc/backuppc
> > was in the original installation.
>=20
> There could be an alternative explanation for the symptoms. I'm
> wondering if the /etc/backuppc directory in your temporary mount
> doesn't have the same permissions as those in the original mount.
> That might explain why you could write to the temporary mount. If
> that's the case then, the problem might be $Conf{UmaskMode} in your
> BackupPC's config.pl. Take a look at that value (it's expressed as
> octal digits, they will be 027) and also at
>=20
> perldoc -f umask
>=20
> I think perhaps it's the *process* permissions which are too tight for
> your setup, not those of files/directories in the filesystem.
>=20
> You could try changing $Conf{UmaskMode} from 027 to 007 in config.pl.
>=20
> If there is any temporary '.new' file hanging around after a previous
> attempt then if it does not have group write permission you will want
> to delete it before trying again - I'm not sure that BackupPC will
> change the permissions of an existing file.
>=20
> --=20
>=20
> 73,
> Ged.
>=20
>=20
> _______________________________________________
> BackupPC-users mailing list
> [email protected]
> List: https://lists.sourceforge.net/lists/listinfo/backuppc-users
> Wiki: https://github.com/backuppc/backuppc/wiki
> Project: https://backuppc.github.io/backuppc/
>=20
--eaf79cb21472b89d118d2c5ca43843200b7bf7b0
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE html><html><head><title></title></head><body><div style=3D"fon=
t-family:Verdana;">I've done a lot of digging into this, and while I hav=
e not solved it yet, I want to document in case anyone else runs into th=
is problem and finds this through archives of this mailing list.</div><d=
iv style=3D"font-family:Verdana;"><br></div><div style=3D"font-family:Ve=
rdana;">First off, this is an issue introduced with the recently release=
d Ubuntu 26.04 LTS. I fired up a spare machine that had 24.04 LTS =
running on it, and all I had to do was "sudo apt install apache2" and "s=
udo apt install backuppc", start both with systemctl and was instantly u=
p and running, with no problems modifying the configuration files. =
If I don't get this figured out I may just go and load 24.04 on my back=
uppc server box, but would prefer to be more up to date.</div><div style=
=3D"font-family:Verdana;"><br></div><div style=3D"font-family:Verdana;">=
As of last weekend, I was thinking there had been a disk error since mou=
nting an external file system allowed things to work. The revision=
to the /usr/share/backuppc/lib/BackupPC/Storage/Text.pm file, whic=
h I did based on this search find: <a href=3D"https://github.com/ba=
ckuppc/backuppc/issues/188">Can not edit config.pl and open log file in =
web Interface =C2=B7 Issue #188 =C2=B7 backuppc/backuppc</a> provid=
ed a more expansive error message indicating that the file system was re=
ad-only:</div><div style=3D"font-family:Verdana;"><br></div><div style=3D=
"font-family:Verdana;">---</div><div style=3D"font-family:Verdana;">Text=
FileWrite: Failed to write /etc/backuppc/localhost.pl.new (errno =3D Rea=
d-only file system, uids =3D 33,113, gids =3D 33 33,33 33, umask =3D 027=
, ver =3D v5.40.1, prog =3D /usr/bin/perl)</div><div style=3D"font-famil=
y:Verdana;">---</div><div style=3D"font-family:Verdana;"><br></div><div =
style=3D"font-family:Verdana;">(note uid and gid 33 are both www-data an=
d uid 113 is backuppc).</div><div style=3D"font-family:Verdana;"><br></d=
iv><div style=3D"font-family:Verdana;">So I went down a rabbit hole of d=
isk diagnostics. Smartmontools indicated I *may* have a problem, e=
ven though the disk "passed" so I reformatted the partition with mkfs fl=
ags that ran a destructive badblocks command (writes to every block mult=
iple times to cause any bad blocks to get remapped). Yes, excessiv=
e. Took days to run. Reinstalled everything (no indications of any=
bad blocks this time around), and I got the exact same results. &n=
bsp;</div><div style=3D"font-family:Verdana;"><br></div><div style=3D"fo=
nt-family:Verdana;">---</div><div style=3D"font-family:Verdana;"><br></d=
iv><div style=3D"font-family:Verdana;"><span class=3D"font" style=3D"fon=
t-family:menlo, consolas, monospace, sans-serif;">username@backuppc:/mnt=
$ ls -la /etc/backuppc/</span></div><div style=3D"font-family:Verdana;">=
<span class=3D"font" style=3D"font-family:menlo, consolas, monospace, sa=
ns-serif;">total 212</span></div><div style=3D"font-family:Verdana;"><sp=
an class=3D"font" style=3D"font-family:menlo, consolas, monospace, sans-=
serif;">drwxrwxr-x 2 backuppc www-data 4096 May 29 09:=
24 .</span></div><div style=3D"font-family:Verdana;"><span class=3D"font=
" style=3D"font-family:menlo, consolas, monospace, sans-serif;">drwxr-xr=
-x 142 root root 12288 M=
ay 29 10:24 ..</span></div><div style=3D"font-family:Verdana;"><span cla=
ss=3D"font" style=3D"font-family:menlo, consolas, monospace, sans-serif;=
">-rw-r----- 1 backuppc backuppc 0 M=
ay 30 11:00 LOCK</span></div><div style=3D"font-family:Verdana;"><span c=
lass=3D"font" style=3D"font-family:menlo, consolas, monospace, sans-seri=
f;">-rw-r--r-- 1 backuppc www-data 835 May 29 09=
:24 apache.conf</span></div><div style=3D"font-family:Verdana;"><span cl=
ass=3D"font" style=3D"font-family:menlo, consolas, monospace, sans-serif=
;">-rw-rw-r-- 1 backuppc www-data 88554 Feb 2 15:19 co=
nfig.pl</span></div><div style=3D"font-family:Verdana;"><span class=3D"f=
ont" style=3D"font-family:menlo, consolas, monospace, sans-serif;">-rw-r=
w-r-- 1 backuppc www-data 88392 Feb 2 15:19 config.pl.=
sample</span></div><div style=3D"font-family:Verdana;"><span class=3D"fo=
nt" style=3D"font-family:menlo, consolas, monospace, sans-serif;">-rw-rw=
-r-- 1 backuppc www-data 2243 Feb 2 15:19 hosts<=
/span></div><div style=3D"font-family:Verdana;"><span class=3D"font" sty=
le=3D"font-family:menlo, consolas, monospace, sans-serif;">-rw-rw-r--&nb=
sp; 1 backuppc www-data 2243 Feb 2 15:19 hosts.sample<=
/span></div><div style=3D"font-family:Verdana;"><span class=3D"font" sty=
le=3D"font-family:menlo, consolas, monospace, sans-serif;">-rw-r-----&nb=
sp; 1 backuppc www-data 47 May 29 09:09 htpasswd=
</span></div><div style=3D"font-family:Verdana;"><span class=3D"font" st=
yle=3D"font-family:menlo, consolas, monospace, sans-serif;">-rw-rw-r--&n=
bsp; 1 backuppc www-data 427 Feb 2 15:19 localho=
st.pl</span></div><div style=3D"font-family:Verdana;"><span class=3D"fon=
t" style=3D"font-family:menlo, consolas, monospace, sans-serif;">lrwxrwx=
rwx 1 root root &nb=
sp; 13 May 28 22:46 pc -> /etc/backuppc</span></div=
><div style=3D"font-family:Verdana;"><span class=3D"font" style=3D"font-=
family:menlo, consolas, monospace, sans-serif;">username@backuppc:/mnt$ =
ls -la /mnt/sdb2</span></div><div style=3D"font-family:Verdana;"><span c=
lass=3D"font" style=3D"font-family:menlo, consolas, monospace, sans-seri=
f;">total 220</span></div><div style=3D"font-family:Verdana;"><span clas=
s=3D"font" style=3D"font-family:menlo, consolas, monospace, sans-serif;"=
>drwxrwxr-x 3 backuppc www-data 4096 May 29 09:24 .</span></div><d=
iv style=3D"font-family:Verdana;"><span class=3D"font" style=3D"font-fam=
ily:menlo, consolas, monospace, sans-serif;">drwxr-xr-x 3 root &nbs=
p; root 4096 May 30 11:13 ..</=
span></div><div style=3D"font-family:Verdana;"><span class=3D"font" styl=
e=3D"font-family:menlo, consolas, monospace, sans-serif;">-rw-r----- 1 b=
ackuppc backuppc 0 May 30 11:00 LOCK</span></div=
><div style=3D"font-family:Verdana;"><span class=3D"font" style=3D"font-=
family:menlo, consolas, monospace, sans-serif;">-rw-r--r-- 1 backuppc ww=
w-data 835 May 29 09:24 apache.conf</span></div><div style=3D=
"font-family:Verdana;"><span class=3D"font" style=3D"font-family:menlo, =
consolas, monospace, sans-serif;">-rw-rw-r-- 1 backuppc www-data 88554 F=
eb 2 15:19 config.pl</span></div><div style=3D"font-family:Verdana=
;"><span class=3D"font" style=3D"font-family:menlo, consolas, monospace,=
sans-serif;">-rw-rw-r-- 1 backuppc www-data 88392 Feb 2 15:19 con=
fig.pl.sample</span></div><div style=3D"font-family:Verdana;"><span clas=
s=3D"font" style=3D"font-family:menlo, consolas, monospace, sans-serif;"=
>-rw-rw-r-- 1 backuppc www-data 2243 Feb 2 15:19 hosts</span=
></div><div style=3D"font-family:Verdana;"><span class=3D"font" style=3D=
"font-family:menlo, consolas, monospace, sans-serif;">-rw-rw-r-- 1 backu=
ppc www-data 2243 Feb 2 15:19 hosts.sample</span></div><div =
style=3D"font-family:Verdana;"><span class=3D"font" style=3D"font-family=
:menlo, consolas, monospace, sans-serif;">-rw-r----- 1 backuppc www-data=
47 May 29 09:09 htpasswd</span></div><div style=3D"fo=
nt-family:Verdana;"><span class=3D"font" style=3D"font-family:menlo, con=
solas, monospace, sans-serif;">-rw-rw-r-- 1 backuppc www-data  =
; 427 Feb 2 15:19 localhost.pl</span></div><div style=3D"font-fami=
ly:Verdana;"><span class=3D"font" style=3D"font-family:menlo, consolas, =
monospace, sans-serif;">drwx------ 2 root root&n=
bsp; 16384 May 30 11:12 lost+found</span></div><div st=
yle=3D"font-family:Verdana;"><span class=3D"font" style=3D"font-family:m=
enlo, consolas, monospace, sans-serif;">lrwxrwxrwx 1 root &nb=
sp; root 13 May 28 22:46=
pc -> /etc/backuppc</span></div><div style=3D"font-family:Verdana;">=
<span class=3D"font" style=3D"font-family:menlo, consolas, monospace, sa=
ns-serif;">username@backuppc:/mnt$ sudo umount /mnt/sdb2</span></div><di=
v style=3D"font-family:Verdana;"><span class=3D"font" style=3D"font-fami=
ly:menlo, consolas, monospace, sans-serif;">username@backuppc:/mnt$ sudo=
mount /dev/sdb2 /etc/backuppc</span></div><div style=3D"font-family:Ver=
dana;"><span class=3D"font" style=3D"font-family:menlo, consolas, monosp=
ace, sans-serif;">username@backuppc:/mnt$ ls -la /etc/backuppc/</span></=
div><div style=3D"font-family:Verdana;"><span class=3D"font" style=3D"fo=
nt-family:menlo, consolas, monospace, sans-serif;">total 228</span></div=
><div style=3D"font-family:Verdana;"><span class=3D"font" style=3D"font-=
family:menlo, consolas, monospace, sans-serif;">drwxrwxr-x 3=
backuppc www-data 4096 May 29 09:24 .</span></div><div style=3D"f=
ont-family:Verdana;"><span class=3D"font" style=3D"font-family:menlo, co=
nsolas, monospace, sans-serif;">drwxr-xr-x 142 root &nb=
sp; root 12288 May 29 10:24 ..</span></div><div =
style=3D"font-family:Verdana;"><span class=3D"font" style=3D"font-family=
:menlo, consolas, monospace, sans-serif;">-rw-r----- 1 backu=
ppc backuppc 0 May 30 11:00 LOCK</span></div><di=
v style=3D"font-family:Verdana;"><span class=3D"font" style=3D"font-fami=
ly:menlo, consolas, monospace, sans-serif;">-rw-r--r-- 1 bac=
kuppc www-data 835 May 29 09:24 apache.conf</span></div><div=
style=3D"font-family:Verdana;"><span class=3D"font" style=3D"font-famil=
y:menlo, consolas, monospace, sans-serif;">-rw-rw-r-- 1 back=
uppc www-data 88554 Feb 2 15:19 config.pl</span></div><div style=3D=
"font-family:Verdana;"><span class=3D"font" style=3D"font-family:menlo, =
consolas, monospace, sans-serif;">-rw-rw-r-- 1 backuppc www-=
data 88392 Feb 2 15:19 config.pl.sample</span></div><div style=3D"=
font-family:Verdana;"><span class=3D"font" style=3D"font-family:menlo, c=
onsolas, monospace, sans-serif;">-rw-rw-r-- 1 backuppc www-d=
ata 2243 Feb 2 15:19 hosts</span></div><div style=3D"font-fa=
mily:Verdana;"><span class=3D"font" style=3D"font-family:menlo, consolas=
, monospace, sans-serif;">-rw-rw-r-- 1 backuppc www-data&nbs=
p; 2243 Feb 2 15:19 hosts.sample</span></div><div style=3D"font-fa=
mily:Verdana;"><span class=3D"font" style=3D"font-family:menlo, consolas=
, monospace, sans-serif;">-rw-r----- 1 backuppc www-data&nbs=
p; 47 May 29 09:09 htpasswd</span></div><div style=3D"font-f=
amily:Verdana;"><span class=3D"font" style=3D"font-family:menlo, consola=
s, monospace, sans-serif;">-rw-rw-r-- 1 backuppc www-data&nb=
sp; 427 Feb 2 15:19 localhost.pl</span></div><div style=3D"f=
ont-family:Verdana;"><span class=3D"font" style=3D"font-family:menlo, co=
nsolas, monospace, sans-serif;">drwx------ 2 root  =
; root 16384 May 30 11:12 lost+found=
</span></div><div style=3D"font-family:Verdana;"><span class=3D"font" st=
yle=3D"font-family:menlo, consolas, monospace, sans-serif;">lrwxrwxrwx&n=
bsp; 1 root root &n=
bsp; 13 May 28 22:46 pc -> /etc/backuppc</span></div><div=
style=3D"font-family:Verdana;"><span class=3D"font" style=3D"font-famil=
y:menlo, consolas, monospace, sans-serif;">username@backuppc:/mnt$</span=
></div><div style=3D"font-family:Verdana;"><br></div><div style=3D"font-=
family:Verdana;">---</div><div style=3D"font-family:Verdana;"><br></div>=
<div style=3D"font-family:Verdana;">Here I check the permissions of /etc=
/backuppc as it exists on the main file system (note, I had already adde=
d write permissions to group to several of the files in this directory b=
ut that didn't solve anything. As you can see, the permissions of =
the /etc/backuppc directory are drwxrwxr-x backuppc www-data&=
nbsp; (rw for both the user and group). And the config files, othe=
r than apache.conf and htpasswd are also rw for both user (backuppc) and=
group (www-data).</div><div style=3D"font-family:Verdana;"><br></div><d=
iv style=3D"font-family:Verdana;">Then I mounted a file system to which =
I had previously copied over the contents of /etc/backuppc, using rsunc =
to preserve all attributes ("sudo rsync -av /etc/backuppc/ /mnt/sdb2").&=
nbsp; I had temporarily mounted this at /mnt/sdb2 to do the copying.&nbs=
p; I unmounted it from there and then mounted it on /etc/backuppc. =
As you can see, it had the exact same contents and permissions (plus it=
had a lost+found directory).</div><div style=3D"font-family:Verdana;"><=
br></div><div style=3D"font-family:Verdana;">Using the "native" /etc/bac=
kuppc, I got the "failed to write" error. After mounting the separ=
ate-disk /etc/backuppc I got no error message.</div><div style=3D"font-f=
amily:Verdana;"><br></div><div style=3D"font-family:Verdana;">I have tri=
ed G.W.'s suggestion to change $Conf{UmaskMode} in BackupPC's&=
nbsp;config.pl to 007 from 027 but this made no difference.</div><d=
iv style=3D"font-family:Verdana;"><br></div><div style=3D"font-family:Ve=
rdana;">Both G.W. and tomas's suggestion that this is apparmor causing p=
roblems, but I dug into that and it doesn't look like there is any probl=
ems. I searched the logs running "sudo journalctl | grep apparmor =
| grep backuppc" and got nothing other than "backuppc being the name of =
the computer. I also looked through /etc/apparmor.d directory and =
there is nothing there for apache2 nor backuppc.</div><div style=3D"font=
-family:Verdana;"><br></div><div style=3D"font-family:Verdana;">So I am =
still stuck. I must be the first person to try to install backuppc=
on the new Ubuntu, or else everyone else is way smarter than me and fig=
ured this out on their own. Maybe I should file a bug report with Ubuntu=
.</div><div style=3D"font-family:Verdana;"><br></div><div>On Mon, May 25=
, 2026, at 11:36 AM, G.W. Haywood wrote:</div><blockquote type=3D"cite" =
id=3D"qt" style=3D""><div style=3D"font-family:Verdana;">Hi there,</div>=
<div style=3D"font-family:Verdana;"><br></div><div style=3D"font-family:=
Verdana;">On Sun, 24 May 2026, backuppc@sundquist... wrote:</div><div st=
yle=3D"font-family:Verdana;"><br></div><div style=3D"font-family:Verdana=
;">> ...</div><div style=3D"font-family:Verdana;">> I reinstalled =
Apache2 and backuppc.</div><div style=3D"font-family:Verdana;">> ...<=
/div><div style=3D"font-family:Verdana;"><br></div><div style=3D"font-fa=
mily:Verdana;">That was probably excessive. Did you see my private=
mail?</div><div style=3D"font-family:Verdana;"><br></div><div style=3D"=
font-family:Verdana;">8<---------------------------------------------=
-------------------------</div><div style=3D"font-family:Verdana;"><br><=
/div><div style=3D"font-family:Verdana;">Date: Fri, 15 May 2026 08:59:25=
+0100 (BST)</div><div style=3D"font-family:Verdana;">From: G.W. Haywood=
<<a href=3D"mailto:[email protected]">[email protected]=
.uk</a>></div><div style=3D"font-family:Verdana;">To: <a href=3D=
"mailto:[email protected]">[email protected]=
</a></div><div style=3D"font-family:Verdana;">Subject: Re: Fresh install=
(ubuntu) permissions issues</div><div style=3D"font-family:Verdana;"><b=
r></div><div style=3D"font-family:Verdana;">8<-----------------------=
-----------------------------------------------</div><div style=3D"font-=
family:Verdana;"><br></div><div style=3D"font-family:Verdana;">> One =
commenter ... had SELinux running and had to write a policy</div><div st=
yle=3D"font-family:Verdana;">> ... I don't have SELinux running=
.</div><div style=3D"font-family:Verdana;"><br></div><div style=3D"font-=
family:Verdana;">On Ubuntu I think it's more likely to be AppArmor than =
SELinux.</div><div style=3D"font-family:Verdana;"><br></div><div style=3D=
"font-family:Verdana;">> ... One respondent provided some code to add=
to .../Storage/Text.pm</div><div style=3D"font-family:Verdana;">> to=
get more info on the error. I did this and got ...</div><div styl=
e=3D"font-family:Verdana;">> ---</div><div style=3D"font-family:Verda=
na;">> TextFileWrite: Failed to write /etc/backuppc/localhost.pl.new =
\</div><div style=3D"font-family:Verdana;">> (errno =3D Read-only fil=
e system, uids =3D 33,113, gids =3D 33 33,33 33,</div><div style=3D"font=
-family:Verdana;">> umask =3D 027, ver =3D v5.40.1, prog =3D /usr/bin=
/perl)</div><div style=3D"font-family:Verdana;">> ---</div><div style=
=3D"font-family:Verdana;">> ...</div><div style=3D"font-family:Verdan=
a;">> ... the read-only file system message, .. didn't make sense ...=
</div><div style=3D"font-family:Verdana;"><br></div><div style=3D"font-f=
amily:Verdana;">Unless there really is a problem with the filesystem, wh=
ich is quite</div><div style=3D"font-family:Verdana;">possible but seems=
to me unlikely, I wonder if that might just be a</div><div style=3D"fon=
t-family:Verdana;">misleading error message. Can you point me to t=
he code that you used</div><div style=3D"font-family:Verdana;">to modify=
your <a href=3D"http://Text.pm">Text.pm</a>?</div><div style=3D"fo=
nt-family:Verdana;"><br></div><div style=3D"font-family:Verdana;">> .=
.. plugged in an external drive with a fresh ext4 partition. Did a=
</div><div style=3D"font-family:Verdana;">> temporary mount and copie=
d over the contents of /etc/backuppc, then</div><div style=3D"font-famil=
y:Verdana;">> remounted it at /etc/backuppc.</div><div style=3D"font-=
family:Verdana;">> </div><div style=3D"font-family:Verdana;">>=
; And it worked! So I must have some bad blocks where /etc/backupp=
c</div><div style=3D"font-family:Verdana;">> was in the original inst=
allation.</div><div style=3D"font-family:Verdana;"><br></div><div style=3D=
"font-family:Verdana;">There could be an alternative explanation for the=
symptoms. I'm</div><div style=3D"font-family:Verdana;">wondering =
if the /etc/backuppc directory in your temporary mount</div><div style=3D=
"font-family:Verdana;">doesn't have the same permissions as those in the=
original mount.</div><div style=3D"font-family:Verdana;">That might exp=
lain why you could write to the temporary mount. If</div><div styl=
e=3D"font-family:Verdana;">that's the case then, the problem might be $C=
onf{UmaskMode} in your</div><div style=3D"font-family:Verdana;">BackupPC=
's <a href=3D"http://config.pl">config.pl</a>. Take a look at=
that value (it's expressed as</div><div style=3D"font-family:Verdana;">=
octal digits, they will be 027) and also at</div><div style=3D"font-fami=
ly:Verdana;"><br></div><div style=3D"font-family:Verdana;">perldoc -f um=
ask</div><div style=3D"font-family:Verdana;"><br></div><div style=3D"fon=
t-family:Verdana;">I think perhaps it's the *process* permissions which =
are too tight for</div><div style=3D"font-family:Verdana;">your setup, n=
ot those of files/directories in the filesystem.</div><div style=3D"font=
-family:Verdana;"><br></div><div style=3D"font-family:Verdana;">You coul=
d try changing $Conf{UmaskMode} from 027 to 007 in <a href=3D"http:=
//config.pl">config.pl</a>.</div><div style=3D"font-family:Verdana;"><br=
></div><div style=3D"font-family:Verdana;">If there is any temporary '.n=
ew' file hanging around after a previous</div><div style=3D"font-family:=
Verdana;">attempt then if it does not have group write permission you wi=
ll want</div><div style=3D"font-family:Verdana;">to delete it before try=
ing again - I'm not sure that BackupPC will</div><div style=3D"font-fami=
ly:Verdana;">change the permissions of an existing file.</div><div style=
=3D"font-family:Verdana;"><br></div><div style=3D"font-family:Verdana;">=
-- </div><div style=3D"font-family:Verdana;"><br></div><div style=3D=
"font-family:Verdana;">73,</div><div style=3D"font-family:Verdana;">Ged.=
</div><div style=3D"font-family:Verdana;"><br></div><div style=3D"font-f=
amily:Verdana;"><br></div><div style=3D"font-family:Verdana;">__________=
_____________________________________</div><div style=3D"font-family:Ver=
dana;">BackupPC-users mailing list</div><div style=3D"font-family:Verdan=
a;"><a href=3D"mailto:[email protected]">BackupPC-use=
[email protected]</a></div><div style=3D"font-family:Verdana;">Li=
st: <a href=3D"https://lists.sourceforge.net/list=
s/listinfo/backuppc-users">https://lists.sourceforge.net/lists/listinfo/=
backuppc-users</a></div><div style=3D"font-family:Verdana;">Wiki: &=
nbsp; <a href=3D"https://github.com/backuppc/backuppc/wiki">h=
ttps://github.com/backuppc/backuppc/wiki</a></div><div style=3D"font-fam=
ily:Verdana;">Project: <a href=3D"https://backuppc.github.io/backup=
pc/">https://backuppc.github.io/backuppc/</a></div><div style=3D"font-fa=
mily:Verdana;"><br></div></blockquote><div style=3D"font-family:Verdana;=
"><br></div></body></html>
--eaf79cb21472b89d118d2c5ca43843200b7bf7b0--
--===============4981341281190167450==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
--===============4981341281190167450==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
BackupPC-users mailing list
[email protected]
List: https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki: https://github.com/backuppc/backuppc/wiki
Project: https://backuppc.github.io/backuppc/
--===============4981341281190167450==--