add-apt-repository fails if it encounters immutable sources.list.d entry
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
software-properties (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Reason:
We're trying to protect an internal APT source from trivial accidental modification by users (who do have sudo as root).
Steps to reproduce:
echo '# dummy' > /etc/apt/
chattr +i /etc/apt/
add-apt-repository -y ppa:longsleep/
Expected behaviour:
New sources.list for the PPA gets created.
Observed behaviour:
Traceback (most recent call last):
File "/usr/bin/
sys.exit(0 if addaptrepo.main() else 1)
File "/usr/bin/
shortcut.add()
File "/usr/lib/
self.
File "/usr/lib/
sourceslist
File "/usr/lib/
with open(filename, "w") as f:
PermissionError: [Errno 1] Operation not permitted: '/etc/apt/
summary: |
- apt-add-repository fails if it encounters immutable sources.list.d entry + add-apt-repository fails if it encounters immutable sources.list.d entry |
Status changed to 'Confirmed' because the bug affects multiple users.