date int64 1,220B 1,719B | question_description stringlengths 28 29.9k | accepted_answer stringlengths 12 26.4k | question_title stringlengths 14 159 |
|---|---|---|---|
1,478,650,619,000 |
I just learned about Meltdown and Spectre bugs. I read that:
There are patches against Meltdown for Linux (KPTI (formerly KAISER)), Windows, and OS X.
Following the link in the quote I get to an article which is too obscure for me to understand. Still, it says:
The resulting patch set (still called "KAISER") is i... |
Updates are available now !
2017 Nov 09: the Ubuntu Security team is notified by Intel under NDA
2018 Jan 03: issue becomes public a few days before the CRD
2018 Jan 09: Ubuntu kernel updates available (for patching Meltdown) for Ubuntu 16.04 LTS, Ubuntu 17.10, Ubuntu 14.04 LTS (HWE) and Ubuntu 14.04 LTS.
2018 Jan ... | How to fix vulnerabilities related to Spectre and Meltdown bugs in Ubuntu? [duplicate] |
1,478,650,619,000 |
I was trying to make my keyboard more useful and used xmodmap to map mathematical and greek symbols to mod3 modifier level. Where caps lock is mapped to mod3. As I understand, the 8-entry lines in .Xmodmap work as following:
[nothing], [shift], [mod3], [mod3+shift], [altgr], [altgr+shift], [altgr+mod3], [altgr+shift+m... |
I'd better answer my own question for future reference.
After a bit of in-depth research, I found out that xmodmap is actually deprecated and is roughly patched over the xkb keyboard model. The xkb model doesn't use a linear array of alternatives, but splits layouts into groups, with each group having a couple of char... | xmodmap problems and inconsistencies with more than 4 alternative symbols per key |
1,478,650,619,000 |
What I'm trying to do:
I'm trying to scan my File-Server for malware, and I'm using clamav/clamscan, where the man page say's it can scan files up to 4GB.
This man page states:
--max-filesize=#n
Extract and scan at most #n kilobytes from each archive. You may pass
the value in megabytes in format xM or xm, where x... |
I've found this(thanks to @FloHimself): Brief Re-introduction to ClamAV Bytecode Signatures, it's an good overview/supplement of some of the usages of the program and some useful options:
Excerpt:
Bytecode signatures are a specialized type of ClamAV signature which
is able to perform additional processing of the sc... | Warnings/Errors when running clamav/clamscan, scanning 3TB hard-drive |
1,478,650,619,000 |
I've used Linux Mint for a while now and I'm quite the fan. I'm not expert enough to go messing with the kernel or anything like that, but I've noticed small bugs in a couple of software packages that I feel I would be able to fix. However, I have no idea how to begin contributing to the project.
Here's a simple exam... |
In increasing order of helpfulness:
if you identify a bug, report it with as much relevant information as possible (to make it easy for the maintainers to reproduce and then fix).
If you can read the source and identify where the bug occurs, include that information.
If you are able to provide a patch that fixes t... | How do I usefully report a bug [closed] |
1,478,650,619,000 |
I installed mysql on a brand-new Fedora 16 server and it would not start. This is the line from the log file (^G and all):
^G/usr/libexec/mysqld: Can't create/write to file '/tmp/ibNPyIlu' (Errcode: 13)
I looked at /tmp/ and it has rather strange-looking permissions:
drwxrwxrwt.
Why the dot? chmod 1777 does not cha... |
This was a bug with mysqld starting with systemd when they made a change to use ServicesPrivateTmp for additional security. When you performed a yum update, the mysql package was updated to mysql-5.5.22-1.fc16 or greater which corrected the issue.
Bug 815812
Bug 782513
Description of Fedora's implementation of 'Priva... | Fedora 16 strange /tmp permissions: mysqld will not start |
1,478,650,619,000 |
I ran into the error
device-mapper: reload ioctl on osprober-linux-nvme0n1p7 failed: Device or resource busy
while compiling the kernel in Ubuntu Studio. I use ZFS for my main drive.
Apparently, this is a bug: [zfs-root] "device-mapper: reload ioctl on osprober-linux-sdaX failed: Device or resource busy" against... |
According to the launchpad thread you linked to, it is a cosmetic error caused by os-prober not properly ignoring ZFS-managed drives, and if you're not dual-booting you can safely make the message go away with apt purge os-prober. See also here.
| device-mapper: reload ioctl on osprober-linux-nvme0n1p7 failed: Device or resource busy |
1,478,650,619,000 |
I'd like to know how bug fixing exactly works in Linux distributions.
I mean, after all a distro is made of opensource software made by external developers, and then packaged by the distro's maintainers. So why every distro has it own bug tracker? Shouldn't these bugs be submitted to the original authors of such soft... |
(I'll refer to original authors or original software as upstream authors and upstream software because that's what I'm used to calling them.)
From the end-user's perspective, it's nice to have a single place to report bugs, rather than having to sign up for accounts in various upstream bugtrackers for all the software... | How bug fixing exactly works in a distro ? upstream vs downstream |
1,478,650,619,000 |
Is there a way to predict when the next release will be out? I read somewhere that it has to do with number of bugs remaining in the testing branch. Could someone please explain how this works and when the next release will happen based on what variables?
|
See Debian Release Management; for Debian 9, it stated:
As always, Debian 9 “Stretch” will be released “when it’s ready”.
and that’s the general rule for all releases.
The planned release date for Debian 9, June 17 2017, was announced on May 26 of that year. The planned release date for Debian 10, July 6 2019, was a... | How can we predict when the next Debian release will be out? |
1,478,650,619,000 |
I've recently filed a bug with gnome-shell to the GNOME maintainers, on their website (upstream).
However, I'm not sure whether I was maybe supposed to file it to the package maintainers of my distribution (Fedora).
In the future, which should I prefer for similar programs? Or should I file the bug both upstream and t... |
I would suggest filing the bug report with the distribution's bug tracking system, if you are using their build.
They can then escalate the bug report to the upstream maintainer, should it turn out that it exists in a vanilla build as well.
The rationale behind this is simply that since many distributions apply patche... | Should I file bugs upstream, to my distribution maintainers, or both? |
1,478,650,619,000 |
After fresh installing Debian buster OS and
Package: command-not-found
running command:
$ curl
Could not find the database of available applications, run update-command-not-found as root to fix this
Sorry, command-not-found has crashed! Please file a bug report at:
http://www.debian.org/Bugs/Reporting
Please include t... |
Not intuitive, but error goes away immediately after apt update:
# apt update
Hit:1 http://deb.debian.org/debian buster InRelease
Get:2 http://deb.debian.org/debian buster-updates InRelease [49.3 kB]
Hit:3 http://security.debian.org/debian-security buster/updates InRelease
Get:4 http://deb.debian.org/debian buster/mai... | Debian command-not-found error - local variable 'cnf' referenced before assignment |
1,478,650,619,000 |
I know that with RS= we can set the Record Separator to a Null/Empty string; however GNU awk also allows to define the RS as regex, so I decided to use RS='|' and I would expecting gawk to understand this as the same as RS= meaning that "empty-string (or|) empty-string", but that treat it as literal | character, while... |
By definition RS='|' is a literal |. Any single character RS is treated as literal for portability across all awks, otherwise you'd have a script with RS='|' behaving differently in gawk vs a POSIX awk. So a single char RS is literal while a multi-char string as an RS is a regexp if the awk version supports it, otherw... | awk- empty Record Separator: "RS=" vs "RS='|'" vs "RS=(|)" |
1,478,650,619,000 |
I was trying to move a set of 7 files to my computer, via mv g* dir. The command line moved 6 of them, and for the last file gave the following error:
mv: g.tex: Argument list too long
Since the other files, both those before and after it, are already moved, I tried mv g.tex dir. Same error. Moving other files wor... |
E2BIG is not one of the errors that read(2) may return. It looks like a bug in the kernel.
Pure speculation, but it could be down to some corruption on the file system and the macOS driver for the FAT filesystem returning that error upon encountering that corruption which eventually makes it through to the return of r... | mv `Argument list too long` for a single file |
1,478,650,619,000 |
With reference of this Q&A on AU.
Why behavior of GNU grep using -Pz parameters changed and doesn't support start of line ^ and $ end of line anchors?
Is this a bug or correct behavior?
Tested on Ubuntu 16.04 with kernel version 4.4.0-21-generic.
$ echo ^ | grep -Pz ^
grep: unescaped ^ or $ not supported with -Pz
|
This is desired behavior of GNU grep version 2.24 (released on March 10 2016) and above, and that's the fix for the bug which was introduced in GNU grep 2.5.
Looking into the source code:
if (*p == '$' || (*p == '^' && !after_unescaped_left_bracket))
die (EXIT_TROUBLE, 0,
_("unescaped ^ or $ not supported wit... | grep command doesn't support start '^' and '$' end of line anchors when it's with -Pz |
1,478,650,619,000 |
I seem to have two Bash cursors. The initial position of what I deem the "extra" cursor seems to depend on the length of my prompt, with longer prompts causing it to start farther behind. When I type, the extra cursor falls behind by a pixel or two with each keystroke.
This is weird and hard to describe, so I made a G... |
Turns out I'm experiencing this bug: https://github.com/eclipse-theia/theia/issues/8158
EDIT: Theia 1.4 was released sometime in the last 24 hours, and it resolves my issue.
| I seem to have two Bash cursors. What's going on here? |
1,478,650,619,000 |
When I was using Debian, there was a tool called reportbug.
Ironically, the tool itself was probably the buggiest program I have ever used. I was never, ever actually able to make a successful bug report in the graphical mode.
However, the tool seems to be a good idea. I don't have to go through some online identifica... |
Command Line Tools
There is a Fedora-specific command line interface to bugzilla provided by the python-bugzilla package. This may be the closest to thing to Debian's reportbug.
As an alternative, you can try the generic command line interface provided by the pybugz package. However, this is not a Fedora-specific ... | Debian's ReportBug equivalent on Fedora/Gnome? |
1,478,650,619,000 |
I have a really strange audio problem on my Fedora distro (Fedora 35 Workstation Edition), installed on my laptop.
Previously I used Windows 10 on my laptop, and I had no audio problem whatsoever. Then I installed Fedora, and after approximately one month I stared having the following symptoms: Some days, not all days... |
I found the solution, thanks to this other answer! Turns out you just need to execute the following in terminal:
sudo dnf swap --allowerasing pulseaudio pipewire-pulseaudio
Problem gone!
Seems like it was a problem with Pipewire, I have really no idea why a bug like this is present in Fedora 35.. I have read online t... | Inconsistent Fedora 35 audio problem |
1,478,650,619,000 |
I've been using reportbug in novice mode on Debian 9 and needed to cancel the report because no editor was installed (on a Docker image).
The last interaction was
Submit this report on postgresql (e to edit) [y|n|a|c|E|i|l|m|p|q|d|t|s|?]? n
Saving a backup of the report at /tmp/reportbug-postgresql-backup-20180226-11... |
Unfortunately there is no way to open a draft bug report in reportbug. This has been reported several times, and one of the bug reports gives a solution (assuming your system is configured in such a way that sendmail works): edit the draft in your favourite text editor, then send it using
sendmail -t < bugdraft
That’... | How to open a draft in reportbug after canceling the reporting before? |
1,478,650,619,000 |
Red Hat Enterprise Linux 9 is no longer listed as a product under bugzilla at https://bugzilla.redhat.com/enter_bug.cgi?classification=Red%20Hat
There are no onward links indicating the issuer tracker has moved, or where it has moved to.
Google comes up with nothing.
Anyone know where bugs are reported in Red Hat Ente... |
RHEL moved from bugzilla to Jira see the RHEL project at issues.redhat.com. I didn't find an official announcement, only this thread on Fedora Devel mailing list announcing the move in 2022.
CentOS Wiki now also points to Red Hat Jira for reporting bugs against CentOS Stream 8 to 10.
Edit: An update about the migratio... | Where are RHEL9 bugs reported in 2023? |
1,478,650,619,000 |
I try to upgrade a Debian Bullseye but I get an anxious warning message :
% sudo aptitude upgrade
Resolving dependencies...
The following NEW packages will be installed:
linux-headers-5.10.0-18-amd64{a} linux-headers-5.10.0-18-common{a} linux-image-5.10.0-18-amd64{a}
The following packages will be REMOVED:
sse3-s... |
You can see the bug details in the Debian BTS: 1019564 and 1019855.
The libc6 bug only affects fourth-generation Intel systems (Haswell), so if your CPU isn’t a Haswell CPU you can ignore it. There hasn’t been much feedback from the original reporter so it’s not clear how serious the bug actually is. For what it’s wor... | Bug warning with aptitude upgrade #1019855 & #1019564 |
1,478,650,619,000 |
I am asking, because fragment of file /boot/grub/grub.cfg looks like
### BEGIN /etc/grub.d/41_custom ###
if [ -f ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_c... |
here is the description of mapping from command to modulename.mod
http://blog.fpmurphy.com/2010/06/grub2-modules.html?output=pdf
grep -E "^source" /boot/grub/i386-pc/command.lst
source: configfile
grep -E "^\.:" /boot/grub/i386-pc/command.lst
.: configfile
here is the code of function:
http://git.savannah.gnu.org/... | how /etc/grub.d/41_custom is supposed to work? |
1,478,650,619,000 |
A month ago, a regression happened in Debian 12 that caused dead keys not to work for a while.
It was a bug and they corrected it.
Things came back mostly to normal now, except for ` + A that doesn't type À anymore. Today, it produces:
`A
(if you have a VM with a previous Debian 12 version before May, or a Debian 11,... |
In this instance I would report a new bug, referring to #1070745: the symptoms aren’t the same as the original bug.
To do this, use reportbug; since you know it’s probably caused by libglib2.0-0, specify that:
reportbug libglib2.0-0
Include all the information you have. The difference between Debian 11 and 12 might b... | How to notify the Debian team about an issue whose resolution looks unfinished? About dead keys bug, typing: ` + A gives `A and not À like before |
1,478,650,619,000 |
After an update/ upgrade on Debian 12 (weekly update), there is NO WiFi, files are not opening, unable to shutdown or sleep, and freezes when using sudo. The bug is fixed with a new release of kernel. But, I am NOT able to install the new kernel.
I downloaded the new kernel file to a flash drive using another laptop
... |
I got the trick from @Jaromanda X and details from u/Hendersen43 and
u/Only_Space7088 at:
https://www.reddit.com/r/debian/comments/18i60wx/networkmanager_service_freezes_the_whole_pc_after/
I am giving details to help newbees...:
I solved it by:
(1) Interrupting booting process, and changing the kernel back to the pre... | After an update (a kernel bug it seems) Debian 12 hangs when hitting sudo: Unable to install the new kernel with bug fixed |
1,478,650,619,000 |
EDIT: the bug disappears by version 4.3.8.
I am using GNU bash, version 4.1.2(1)-release (x86_64-redhat-linux-gnu). I believe I have found a bug. Would like to know if perhaps I'm missing something or if my bug is version/platform specific.
Bash's history functions will utilize the HISTTIMEFORMAT variable, if defined... |
Further research indicates it was a bug and fixed sometime between the 4.2.x and 4.3.6 releases.
| have I found a bug in BASH? [closed] |
1,484,929,159,000 |
If I open konsole it opens non-stop more windows of konsole and the gui hangs because of overload, I tried apt purge konsole && apt install konsole, I tried to restart but to no avail.
EDIT: @RuiFRibeiro
Here is the contents of ~youruser/.config/konsolerc
[Desktop Entry]
2 DefaultProfile=programmer.profile
3
4 [Fav... |
As from your previous question, it seems konsole is calling itself.
I would view the contents of ~youruser/.config/konsolerc and delete it to fix the problem.
| If I open konsole it opens non-stop more windows of konsole |
1,484,929,159,000 |
I am trying to install clamav in kali for removal of viruses in PC and USB.and I did:
root@kali:~# apt-get install clamav
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package clamav is not available, but is referred to by another package.
This may mean that the packag... |
Check your repos:
http://docs.kali.org/general-use/kali-linux-sources-list-repositories
Update the local cache using:
apt-get update (as Svetlin Tonchev said.)
try again with:
apt-get install clamav
Optional:
Search for it using:
apt-cache search clamav
| E: Package 'clamav' has no installation candidate? |
1,484,929,159,000 |
I'd like to report a bug with my wireless card cutting out (seemingly) randomly, but I don't know what log files to include.
I know a tail -F of a particular log file when the card cuts out would be invaluable.
I just don't want to submit a bug report with no log files that will get lost in the shuffle.
Right now, I'd... |
Normally when reporting the bugs the bug reporting system tells you what files to include, but if they don't then:
/var/log/dmesg
/var/log/daemon.log
/var/log/messages
lspci -vvv
Possibly
/var/log/syslog
But you can simply install:
Debian BTS
and just follow the instructions. :)
| What log files to include when reporting a bug report for my wlan card? |
1,484,929,159,000 |
I find it rather hard to believe, but since I installed kernel:
4.15.0-58
several days ago, my sound on Linux Mint 19.2 Cinnamon stopped working, and no matter what I tried like:
sudo apt reinstall alsa-base pulseaudio
sudo alsa force-reload
reboot(-s)
alsamixer
nothing brought me sound back, so I just inst... |
Since downgrading your kernel restored your audio, this appears to be a regression in the kernel. Since you’re using an Ubuntu kernel, the best place to report the issue is there, but if you’re feeling brave, you could look at all the changes listed in the changelog to try to determine what could be causing the proble... | Sound not working - bug in a specific version of kernel? |
1,484,929,159,000 |
I need to install isc-dhcp-server on debian stretch, but the package cannot be installed correctly.
apt-listbugs list isc-dhcp-server:
#867362 - isc-dhcp-server: DHCP server does not start after upgrade to Stretch
After installing the package
# systemctl status isc-dhcp-server
● isc-dhcp-server.service - LSB: DHCP... |
I have been using the official ISC DHCPd Debian packages in Stretch without systemd, and been using it in Debian and upgrading that particular DHCP cluster since Debian 6 without many hitches.
As for Stretch, I have been using isc-dhcp on it for over a year, I think, since I migrated earlier to take advantage of new v... | Is there a way to get a buggy package to work on debian stretch? |
1,484,929,159,000 |
$ dpkg -l
Gives you a list of all packages installed on your system. Now some bugs on the Debian BTS are tagged patch . Now is there a way to list all packages which are installed on your system for which patches are out there in the Debian BTS. Building, test and reporting as in feedback would make the packages bet... |
As a short script:
for source in $(dpkg-query --show -f '${source:Package}\n' | sort -u); do bts select source:${source} tag:patch; done
This uses dpkg-query to list the installed source packages, and bts (from the devscripts package) to list all bug numbers corresponding to an open bug with a patch filed against any... | Is there a way to find patches which need testing from packages you have? |
1,484,929,159,000 |
From /. found this worrisome post by Theodore Ts'o. Turns out ext4 has some journalling problems. How can I quickly find out version numbers of susceptible kernels for this and other bugs?
|
You can track (and submit) kernel bugs in the Kernel Bug Tracker .
| What is a generic way of finding out whether the kernel has ext4 (or other) bugs? |
1,484,929,159,000 |
How to change the software package an issue is filed under in the Debian bug tracker?
The help page has these instructions:
In case you need to write a message to the bug and also manipulate the bug's metadata, the commands can also be included in the mail to [email protected]. Do this by starting the mail with the c... |
The square brackets indicate that the version is optional; they are not part of the command syntax.
You should either send this to control@bugs.…:
reassign 1019438 kde-plasma-desktop 5:142
thanks
or this to 1019448@bugs.…:
Control: reassign -1 kde-plasma-desktop 5:142
| How do I reassign a bug to another package in the Debian bug tracker? |
1,484,929,159,000 |
GNU bash, version 3.2.48 has this bug; already version 3.2.57 does not.
Make a file with 8000 identical lines (say each line says 1). Run split -a3 -p "1" on it (-p is a BSD split option which makes it split on the given pattern. For a file with just one 1 per line, you can do the same thing with a standard split by ... |
There's very little chance bash would be involved in there.
bash's role in that is to parse that find . -name xaaa -exec echo {} + code and turn that into the execution of /path/to/find with find, ., -name, xaaa, -exec, echo, {}, +. Any bash version would do the same.
Here, as the find: prefix in the error message, t... | `find: fts_read: Invalid argument` when working with around 8000 files |
1,484,929,159,000 |
Somehow v gets unset after calling f.
$ zsh -xc 'v=1; f() { local v; v=2 true; }; f; typeset -p v'
+zsh:1> v=1
+zsh:1> f
+f:0> local v
+f:0> v=2 +f:0> true
+zsh:1> typeset -p v
zsh:typeset:1: no such variable: v
Here is the gist of my original reproduction report.
I did email [email protected], but I have yet to rece... |
That was a bug indeed. You did right the right thing to report it.
It was then fixed by this commit: https://sourceforge.net/p/zsh/code/ci/d946f22a4cd2eed0f3a67881cfa57c805703929c/ which will be included in the next version.
And here's the explanation from zsh's maintainer:
On Wed, 2019-08-14 at 10:37 +0100, Stephane... | zsh: Variable gets unset without reason |
1,484,929,159,000 |
I have tftpd-hpa installed(Ubuntu 16.04 LTS). Recently, maybe after getting some updates (or uninstalling some application with vaste dependencies) the tftpd-hpa doesn't start anymore. The tftpd-hpa settings are:
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/var/lib/tftpboot"
TFTP_ADDRESS=":69"
TFTP_OPTIONS="--secure --create... |
Combining the two parts of information:
Recently, after some updates received
And the following error:
Apr 18 01:47:32 Amtek in.tftpd[4777]: cannot bind to local IPv4
socket: Address already in use
It seems like the problem is that the tftp port (69) is already in use, when you start the tftp server. This might ... | The tftpd-hpa doesn't start after update |
1,484,929,159,000 |
I've come across an interesting issue this morning. We have noticed that GDM on RHEL 7 is allowing us to log-in with only the first 7 characters of password. We can enter anything or nothing from characters 8 onwards and we still get authenticated and logged in. This problem affects all RHEL 7 workstations on the netw... |
It's known: NIS can use DES (where the short passwords are seen) or other formats which support longer passwords.
Further reading:
AJ's Open Source, openSUSE and SUSE Ramblings
Migration of NIS yppasswd hashes from crypt to md5
Are passwords on modern Unix/Linux systems still limited to 8 characters?
| Red Hat 7 GDM + NIS Only Validates First 7 Characters of Password |
1,484,929,159,000 |
I run Debian testing and occasionally notice hiccups in my system. I'd like to be able to see if someone has reported a related bug, but don't always know what package names to look for. Or, before running a dist-upgrade I might just want to see if there has been a spike in bug reports in the last few days just to see... |
That's indeed poorly documented. You can display the latest 100 entries using this link:
https://bugs.debian.org/cgi-bin/pkgreport.cgi?newest=100
You can further narrow your search by selecting the desired distribution, ex.
https://bugs.debian.org/cgi-bin/pkgreport.cgi?newest=100;dist=stable2
This will take you to a f... | How to view recently submitted bugs in Debian bugtracker |
1,484,929,159,000 |
I'm using Debian Wheezy 64bit and wine is only existing in a 32bit version. So I added multiarch support. But when I want to install winetricks it's dependencies are
depends on wine | wine-unstable
and not
depends on wine | wine-unstable | wine:i386
So, aptitude suggests to install the dummy 64bit package or to not in... |
The problem is not winetricks - multi-arch works in a different way as you think (I suggest (re-)reading the first sections of Debian's Multiarch-HOWTO).
You actually need to install the wine:amd64-package instead of the wine:i386-package. The wheezy wine package depends on wine-bin | wine64-bin. The first is resolved... | Debian - How to find out if a package is multiarchified? Dependency changes as bug report |
1,484,929,159,000 |
I am currently experiencing this bug, except that I'm using the Wheezy/testing netinstaller. Strangely, I used the netinst .iso a few months ago, and everything was fine. So it almost seems as if the same bug keeps creeping back into the system. That said, I have a very hard time understanding the format of the bug re... |
Bug is archived. No further changes may be made.
“Archived” means that the bug has been resolved in some way (fixed, or closed as invalid). An archived bug won't change at all. If you see no non-archived bug that corresponds to your issue, report a new one.
| Trouble understanding the Debian bug reporting system |
1,484,929,159,000 |
I'm using a live and persistent version of Ubuntu 13.04, created with LinuxLive USB Creator.
The persistence mostly works, including for documents and apps, however the desktop background image and keyboard layout settings have to be configured manually each boot; the system prompts to install to a hard drive as well.... |
Please look at this post: How do I set the default icon set and wallpaper for new users?
Changing the wallpaper
Open a terminal and type gconf-editor. Now, navigate to apps > gnome > background. Edit the key picture_filename and type in the path of the desired wallpaper image. Try rebooting and check if it works. I ha... | Ubuntu 13.04 with LinuxLive USB Creator and persistence forgets desktop background and keyboard layout |
1,484,929,159,000 |
The installer won't start in graphical mode or text mode.
Where to go to review/discuss/report possible bugs in the iso and/or installer?
https://cdimage.debian.org/images/bookworm_di_rc1/amd64/iso-cd/ does not seem to say, nor does www debian org CD faq nor lists debian org debian-testing
I have tried the three diffe... |
The RC1 installer announcement includes links to known errata and the installer page. In general, the recommendation is to submit an installation report; you can view current installation reports on the installation-reports pseudo-package.
The relevant mailing list for your situation is probably debian-cd.
| Debian Bookworm RC1 iso installer won't start on Virtualbox 7.0.6 on Ubuntu 22.04.2, how to find the status of this issue? |
1,484,929,159,000 |
I have a laptop that I am installing RHEL 8.3 for Developer.
I get an error: An unknown error has occurred.
Reference is made to anaconda and I find some aspect on RHEL portal. https://access.redhat.com/solutions/5116361
However, this does not help me as, I am following the standard install procedure. I cannot see how... |
Installed RHEL 8.2, no such issue.
As GAD3R stated it appears to be a bug.
Bug 1921159 Submitted
| "An unknown error has occurred" is output when installing RHEL 8.3 on fresh system |
1,484,929,159,000 |
I had the following script to alert me when someone sends me mail:
cd /var/mail
watch -g ls && cat end
./alert
end would be a blank file; when I am going home, I would modify the end file from another shell, and the script would end due to the -g switch.
I then realized that, rather than opening another shell, I coul... |
Two processes writing to the screen at the same time can mess up. Try appending
reset
after echo y, it should reset the terminal back to normal. Maybe add a short sleep before it, too, so watch can't run after reset was run.
Update: If you aren't interested in the output of watch, just redirect both it stdout and std... | Bug: `watch &` won't work within a script |
1,504,304,251,000 |
I would like to set up wpa_supplicant and openvpn to run as non-root user, like the recommended setup for wireshark. I can't find any documentation for what +eip in this example means:
sudo setcap cap_net_raw,cap_net_admin,cap_dac_override+eip /usr/bin/dumpcap
|
The way capabilities work in Linux is documented in man 7 capabilities.
Processes' capabilities in the effective set are against which permission checks are done. File capabilities are used during an execv call (which happens when you want to run another program1) to calculate the new capability sets for the process.
... | How to set capabilities with setcap command? |
1,504,304,251,000 |
An answer to the question "Allowing a regular user to listen to a port below 1024", specified giving an executable additional permissions using setcap such that the program could bind to ports smaller than 1024:
setcap 'cap_net_bind_service=+ep' /path/to/program
What is the correct way to undo these permissions?
|
To remove capabilities from a file use the -r flag
setcap -r /path/to/program
This will result in the program having no capabilities.
| Unset `setcap` additional capabilities on executable |
1,504,304,251,000 |
I am experimenting with capabilities, on Debian Gnu/Linux.
I have copied /bin/ping to my current working directory. As expected it does not work, it was originally setuid root.
I then give my ping the minimal capabilities (not root) by doing sudo /sbin/setcap cap_net_raw=ep ./ping, and my ping works, as expected.
Then... |
There may be a bug/feature in the kernel. There has been some discussion:
https://bugzilla.altlinux.org/show_bug.cgi?id=16694
http://linux.derkeiler.com/Mailing-Lists/Kernel/2005-03/5224.html
I have no idea, if anything has been done, to fix it.
Don't get me wrong - the current behaviour is secure. But it's so
s... | How do I use capsh: I am trying to run an unprivileged ping, with minimal capabilities |
1,504,304,251,000 |
I am trying to create a systemd service for a web server process that has to bind to port 80 and 443. I found some examples setting AmbientCapabilities=CAP_NET_BIND_SERVICE and setting both AmbientCapabilities and CapabilityBoundingSet. From the doc, it is not clear. Systemd doc: link. Linux man doc: link
Should I set... |
They're complete opposites:
AmbientCapabilities grants capabilities that the process normally wouldn't have started with.
CapabilityBoundingSet limits capabilities the process is allowed to obtain. It doesn't grant any.
For your task, it is enough to set AmbientCapabilities to grant the privileges – the bounding set a... | What is the difference between AmbientCapabilities and CapabilityBoundingSet? |
1,504,304,251,000 |
I want to give node.js the ability to listen on port 80, and shutdown the computer. Initially I tried these two commands in sequence:
setcap cap_net_bind_service=+ep /usr/bin/nodejs
setcap cap_sys_boot=+ep /usr/bin/nodejs
Then my app was failing to bind to port 80. I checked with getcap:
# getcap /usr/bin/nodejs
/u... |
And one last desperate syntax guess pays off:
# setcap cap_net_bind_service,cap_sys_boot=+ep /usr/bin/nodejs
# getcap /usr/bin/nodejs
/usr/bin/nodejs = cap_net_bind_service,cap_sys_boot+ep
| 'setcap' overwrites last capability. How do I set multiple capabilities? |
1,504,304,251,000 |
As far as I know, ping needs to create a raw socket (which needs either root access or cap_net_raw capabilities).
From my understanding the trend these last years has been to remove setuid binaries and replaced them with capabilities.
However when I look at the ping binary on my Fedora 32, it doesn't look to have any:... |
I think https://fedoraproject.org/wiki/Changes/EnableSysctlPingGroupRange answers your question:
Enable the Linux kernel's net.ipv4.ping_group_range parameter to cover all groups. This will let all users on the operating system create ICMP Echo sockets without using setuid binaries, or having the CAP_NET_ADMIN and CA... | How does ping work on Fedora without setuid and capabilities? |
1,504,304,251,000 |
Using setcap to give additional permissions to a binary should write the new permission somewhere, on storage or in memory, where is it stored ?
Using lsof as is doesn't work because the process disappear too quickly.
|
Extended permissions such as access control lists set by setfacl and capability flags set by setcap are stored in the same place as traditional permissions and set[ug]id flags set by chmod: in the file's inode.
(They may actually be stored in a separate block on the disk, because an inode has a fixed size which has ro... | When using setcap, where is the permission stored? |
1,504,304,251,000 |
I want to run a command on Linux in a way that it cannot create or open any files to write. It should still be able to read files as normal (so an empty chroot is not an option), and still be able to write to files already open (especially stdout).
Bonus points if writing files to certain directories (i.e. the current... |
It seems that the right tool for this job is fseccomp Based on sync-ignoringf code by Bastian Blank, I came up with this relatively small file that causes all its children to not be able to open a file for writing:
/*
* Copyright (C) 2013 Joachim Breitner <[email protected]>
*
* Based on code Copyright (C) 2013 Bas... | How to prevent a process from writing files |
1,504,304,251,000 |
root@macine:~# getcap ./some_bin
./some_bin =ep
What does "ep" mean? What are the capabilities of this binary?
|
# getcap ./some_bin
./some_bin =ep
That binary has ALL the capabilites permitted (p) and effective (e) from the start.
In the textual representation of capabilities, a leading = is equivalent to all=. From the cap_to_text(3) manpage:
In the case that the leading operator is =, and no list of capabilities is provi... | What does the "ep" capability mean? |
1,504,304,251,000 |
If I want to set a capability (capabilities(7)), such as CAP_NET_BIND_SERVICE, on an executable file and that file is a script, do I have to set the capability (setcap(8)) on the interpreter starting that script or is it sufficient to set it on the script file itself?
Note: the question concerns Scientific Linux 6.1 i... |
Setting capability on the script will not be effective. It's the similar situation as not working setuid bit on script. Similar as in the latter case it's the implementation of how execve handles shebang and the security reasoning behind it (for details see: Allow setuid on shell scripts).
I think you have these optio... | Capabilities for a script on Linux |
1,504,304,251,000 |
I'm starting a webserver as non-root using a systemd unit file.
I am getting listen tcp :80: bind: permission denied even though I already ran
setcap cap_net_bind_service=+ep
on the executable.
In an example unit file on the internet I found
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
AmbientCapabilities=CAP_NET_BIND... |
It's correct to say that in general systemd will not work with file capabilities managed with setcap and will require you to configure them as part of the service unit instead.
So it's not like setcap is completely deprecated... (There might be valid uses for it outside of services launched by systemd.) But it doesn't... | Is setcap deprecated? |
1,504,304,251,000 |
I'm trying to run an app in a docker container.The app requires root privileges to run.
sudo docker run --restart always --network host --cap-add NET_ADMIN -d -p 53:53/udp my-image
My question is:
What are the risks when adding the NET_ADMIN capability together with the --network host option.
If an attacker can someh... |
Q1. Can an attacker gain root on my host OS using only the NET_ADMIN capability?
Yes (in some cases).
CAP_NET_ADMIN lets you use the SIOCETHTOOL ioctl() on any network device inside the namespace. This includes commands like ETHTOOL_FLASHDEV, i.e. ethtool -f.
And that's the game. There is a little more explanation... | Docker running an app with NET_ADMIN capability: involved risks |
1,504,304,251,000 |
I am trying to clear my filesystem cache from inside a docker container, like so:
docker run --rm ubuntu:vivid sh -c "/bin/echo 3 > /proc/sys/vm/drop_caches"
If I run this command I get
sh: 1: cannot create /proc/sys/vm/drop_caches: Read-only file system
which is expected, as I cannot write to /proc from inside the ... |
The proc filesystem doesn't support capabilities, ACL, or even changing basic permissions with chmod. Unix permissions determine whether the calling process gets access. Thus only root can write that file. With user namespaces, that's the global root (the one in the original namespace); root in a container doesn't get... | Which Linux capability do I need in order to write to /proc/sys/vm/drop_caches? |
1,504,304,251,000 |
I'm trying to understand how Linux capabilities are passed to a process that has been exec()'d by another one. From what I've read, in order for a capability to be kept after exec, it must be in the inheritable set. What I am not sure of, though, is how that set gets populated.
My goal is to be able to run a program a... |
It turns out that setting +i on the wrapper does not add the capability to the CAP_INHERITABLE set for the wrapper process, thus it is not passed through exec. I therefore had to manually add CAP_DAC_OVERRIDE to CAP_INHERITABLE before calling execl:
#include <sys/capability.h>
#include <stdio.h>
#include <unistd.h>
i... | Passing capabilities through exec |
1,504,304,251,000 |
I have a service that I start using systemd. The service user and group are changed to a non-privileged user.
[Service]
...
User=regular_user
Group=regular_user
...
At some point the service needs to start another process, which is expected to become root. That other process has its 's' bit set and it uses setuid() t... |
I actually found the NoNewPrivileges= option that allows my process children to use the setuid().
From what they are saying, it is certainly not an option one should lightly choose to use. However, the default is: do not allow the setuid() feature. (what they mean by «elevate privileges».)
What worked for me was to do... | How do I run a process that wants to become root from a systemd service which is a regular user? |
1,504,304,251,000 |
Thinking about a future web server setup, it struck me that for some reason web servers usually start as root and then drop certain rights (setuid) for the worker processes. In addition there is often chroot involved, which isn't exactly meant as a security measure.
What I was wondering, why can web servers (I have ad... |
Although POSIX has a standard for capabilities which I think includes CAP_NET_BIND_SERVICE, these are not required for conformance and may in some ways be incompatible with the implementation on, e.g., linux.
Since webservers like apache are not written for only one platform, using root privileges is the most portable... | Why are web servers traditionally started as superuser? |
1,504,304,251,000 |
I'm trying to write a tun/tap program in Rust. Since I don't want it to run as root I've added CAP_NET_ADMIN to the binary's capabilities:
$sudo setcap cap_net_admin=eip target/release/tunnel
$getcap target/release/tunnel
target/release/tunnel = cap_net_admin+eip
However, this is not working. Everything I've read say... |
I experienced the same issue when writing a Rust program that spawns a tunctl process for creating and managing TUN/TAP interfaces.
For instance:
let tunctl_status = Command::new("tunctl")
.args(&["-u", "user", "-t", "tap0"])
.stdout(Stdio::null())
.status()?;
failed with:
$ ./targ... | Why is CAP_NET_ADMIN insufficient permissions for ioctl(TUNSETIFF)? |
1,504,304,251,000 |
I learned from here that there's 2 ways to control privileged activities: setuid and capability.
But when I'm playing around with ping on my machine, it seems that it can bypass these 2 mechanism.
First, confirm that on my machine /usr/bin/ping has cap_net_raw capability and it use SOCK_RAW:
$ ll /usr/bin/ping
-rwxr-... |
On a recent Linux system, ping doesn't need any privileges for its most basic operation, which is to send ICMP echo request messages and receive responding echo reply messages.
Ubuntu 20.04 has two implementations of ping. The default one, from iputils-ping, is installed setcap CAP_NET_RAW but works for ICMP echo with... | Why ping works without capability and setuid [duplicate] |
1,504,304,251,000 |
Since RPM 4.7, there has been the ability to specify that a file in an RPM package should be installed with capabilities set (via %caps).
Is there a similar feature for Debian packages?
|
Sadly, no. There isn't a way to make dpkg use file capabilities, and apparently nobody has ever asked, though the library itself is available.
I skimmed through the Debian Policy Manual, and there isn't a single entry that reference this feature. That said, you can use dh_override_install (if you use debhelper), pre/p... | Can capabilities be specified in Debian packages? |
1,504,304,251,000 |
When I modify a file, the file capabilities I had set earlier are lost. Is this the expected behavior?
I first set a file capability:
$ setcap CAP_NET_RAW+ep ./test.txt
$ getcap ./test.txt
./test.txt = cap_net_raw+ep
As expected I found the file capability is set.
Then I modify the file.
$ echo hello >> ./test.txt
N... |
Yes it is expected behaviour. I don't have a document that says it but you can see in this patch from 2007
When a file with posix capabilities is overwritten, the
file capabilities, like a setuid bit, should be removed.
This patch introduces security_inode_killpriv(). This is
currently only defined for c... | Linux File Capabilities are lost when I modify the file. Is this expected behavior? |
1,504,304,251,000 |
Inspired by this question here is the follow-up:
As some of you may know setuid-binaries are dangerous, since some exploits use these to escalate their rights up to root.
Now it seems that there has been an interesting idea to replace setuid with different, more secure means.
How?
|
File system capabilities in Linux were added to allow more fine-grained control than setuid alone will allow. With setuid it's a full escalation of effective privileges to the user (typically root). The capabilities(7) manpage provides the following description:
For the purpose of performing permission checks, tradit... | How to replace setuid with file-system capabilities |
1,504,304,251,000 |
Generally speaking, a unix (or specifically Linux) program can't do something like using ICMP_ECHO ("ping") to check the accessibility of a router unless either run by the superuser or setuid root or blessed with the appropriate POSIX capability. Obviously, on any competently-run system applying either setuid or a POS... |
If you want to reserve the right to use setcap to just sudo enabled users, then there is no need to add any capability to it. Just do that.
If you have some notion of trusted users, you have two options for using capabilities. I've also included a third option if you just want to act like you have a capability, and pe... | Preventing POSIX capabilities proliferation |
1,504,304,251,000 |
While investigating sharing the PID namespace with containers, I noticed something interesting that I don't understand. When a container shares the PID namespace with the host, some processes have their environmental variables protected while others do not.
Let's take, for example, mysql. I'll start a container with a... |
What mechanism is preventing me from reading the mysqld environmental variables and not the tail -f process?
The fact that you're running with a different user ID in the first case. If we start up your two examples:
docker run --name mysql -it -d --env MYSQL_ROOT_PASSWORD=SuperSecret mysql:latest
docker run --name t... | What mechanism prevents me from reading /proc/<PID>/environ in containers with a PID namespace shared with the host? |
1,504,304,251,000 |
I know that if a process is run setuid that it's protected against various things that could subvert the process, like LD_PRELOAD and ptrace (debugging). But I haven't been able to find anything on the same being done for capabilities. I assume the same sorts of things are done with capabilities, since otherwise it wo... |
As mentioned in this Kernel Mailing List message, whether a process needs extra security is checked in cap_bprm_secureexec() of the kernel file security/commoncap.c, which does check for capabilities. This is then exported to the process via the auxiliary vector. This can be accessed/tested via getauxval(AT_SECURE).... | Security of capabilities vs setuid (LD_PRELOAD, etc) |
1,504,304,251,000 |
The "effecive user/group ID" of a process is what the OS uses to determine whether an action (such as opening a file) is permitted by the process. You can set the effective primary GID of the current process using setegid, which can only be used by superusers (or if given the capability) to lower privileges temporaril... |
Such system call doesn't exist because the supplementary groups can be considered to be themselves the effective groups.
The difference between real and effective UID and GIDs exists to allow processes to drop privileges, but also to allow users to raise the privileges with which some processes are called (via the set... | Why is there no "set effective supplementary GIDs" syscall? |
1,504,304,251,000 |
In Linux, a process run by a non-root user can have some capabilities assigned to it to increase its privileges.
And a process that's run by the root user has all of the capabilities available, but can such a process have some of its capabilities removed, either manually or automatically in certain situations?
|
Yes, the idea of capabilities is that the user id itself doesn't give any special abilities. An UID 0 process can also drop unneeded capabilities. It would still retain access to files owned by UID 0 (e.g. /etc/shadow or /etc/ssh/sshd_config), so switching to another UID would still likely be a smart thing to do in ad... | Does a process run by root always have all of the capabilities available in Linux? |
1,504,304,251,000 |
docker run --rm --cap-drop=net_bind_service --publish 8080:80 --name nginx nginx
ps --forest -fC nginx
UID PID PPID C STIME TTY TIME CMD
root 449870 449847 0 12:38 ? 00:00:00 nginx: master process nginx -g daemon off;
101 449929 449870 0 12:38 ? 00:00:00 \_ nginx: w... |
Instead of enabling the privilege to bind to low ports (and other features), Docker lowers the value of the low port below which privilege is needed to 0, thus removing the barrier and allowing any unprivileged process to bind to any port:
daemon/oci_linux.go:
// allow opening any port less than 1024 without CA... | docker run cap-drop=net_bind_service still has nginx running on the port 80 |
1,504,304,251,000 |
This command:
sudo chown -R root:root directory
will remove the SUID bit and reset all capabilities for files. I wonder why it's done silently and it's not mentioned in the man page. Weirdly the GUID bit is not removed. And it doesn't matter who the file or directory belonged to prior to running this command.
Also SU... |
The permissions and capability sets aren’t cleared by the chown utility, they’re cleared by the chown system call (on Linux):
When the owner or group of an executable file is changed by an
unprivileged user, the S_ISUID and S_ISGID mode bits are cleared.
POSIX does not specify whether this also should happen when roo... | Why does chown reset/remove the SUID bit and reset capabilities? |
1,504,304,251,000 |
Currently I'm trying to understand capabilities in Linux by reading http://man7.org/linux/man-pages/man7/capabilities.7.html
I created a small C++ application with the capability CAP_DAC_READ_SEARCH+eip
The capability works fine for the application. But I have a system() call inside
system("cat /dev/mtdX > targetFile"... |
Thx to @mosvy I implemented his solution with libcap and it seems to work as expected.
void inheritCapabilities()
{
cap_t caps;
caps = cap_get_proc();
if (caps == NULL)
throw "Failed to load capabilities";
printf("DEBUG: Loaded Capabilities: %s\n", cap_to_text(caps, NULL));
cap_value_t cap_... | Capability inheritable for system() call in C/C++ |
1,504,304,251,000 |
I am using rootless containers, according to the buildah docs,
Moreover, pinging from a rootless container does not work because it lacks the CAP_NET_RAW security capability that the ping command requires. If you want to ping from within a rootless container, you can allow users to send ICMP packets using this sysctl... |
There’s no direct relationship. CAP_NET_RAW is a capability which allows the use of raw and packet sockets, and binding to any address for transparent proxying. ping_group_range is a sysctl defining a group range allowed to open ICMP echo sockets.
Both of these can be used to allow ping to send and receive ICMP echo p... | What is the relation between CAP_NET_RAW and net.ipv4.ping_group_range? |
1,590,666,593,000 |
Does the root user bypass capability checking in the kernel, or is the root user subject to capability checking starting with Linux 2.2?
May applications check for and deny access for the root user, if certain capabilities are dropped from its capability set?
By default the root user has a full set of capabilities.
Th... |
The root user can be constrained in its set of capabilities. From capabilities(7):
If the effective user ID is changed from nonzero to 0, then the permitted set is copied to the effective set.
This implies that in the capability model, becoming the root user does not grant all permissions, unlike in the traditional... | Does the root user bypass capability checking? |
1,590,666,593,000 |
How do I enable CLONE_NEWUSER in a more fine-grained fashion compared to just kernel.unprivileged_userns_clone?
I want to keep kernel API attack surface manageable by keeping new and complicated things like non-root CAP_SYS_ADMIN or BPF disabled, but also selectively allow it for some specific programs.
For example, c... |
Without creating a custom kernel patch, this isn't possible. Note that this particular Debian-specific sysctl is deprecated. The way to disable user namespaces is user.max_user_namespaces = 0.
A new user namespace is created by kernel/user_namespace.c:create_user_ns(). There are several checks that occur prior to allo... | How do I enable unprivileged_userns_clone selectively for one executable or user? |
1,590,666,593,000 |
In a program I'm enumerating network namespaces by scanning /proc/pid/ for ns/net (sym) links. This program runs inside the "root" namespaces (original init) of the host itself. Normally, I need to run the scanner part as root, as otherwise I will have only limited access to other processes' /proc/pid/ information. I ... |
After some trial and error, I found out that in fact CAP_SYS_PTRACE is needed.
In contrast, CAP_DAC_READ_SEARCH and CAP_DAC_OVERRIDE don't give the required access, which includes readlink() and similar operations.
What I'm seeing can be cross-checked: first, ptrace.c gives the necessary clue in __ptrace_may_access():... | Access /proc/pid/ns/net without running query process as root? |
1,590,666,593,000 |
I've been inspired to start playing around with Linux capabilities again, my pet project is to replace the setuid on a lot of the binaries and provide access to additional privileged utilities to non-root users. Doing this by adding the relevant capabilities (+ei, issue is moot with +ep) via setcap and configure my pe... |
What you want to do is not possible. Not only does pam_cap only manipulate the inheritable capabilities (so it does not actually grant any permitted/effective capability at all), it also only deals with users and not groups (not even primary groups).
| Is it possible to specify groups in /etc/security/capability.conf? |
1,590,666,593,000 |
I've been working on writing my own Linux container from scratch in C. I've borrowed code from several places and put up a basic version with namespaces & cgroups.
Basically, I clone a new process with all the CLONE_NEW* flags to create new namespaces for the clone'ed process.
I also set up UID mapping by inserting 0... |
I would prefer to work from a more complete specification. However from careful reading of the script and your description, I conclude you are entering a network namespace (using the script) first, and entering a user namespace afterwards.
The netns is owned by the initial userns, not your child userns. To do ping, ... | Ping not working in a new C container |
1,590,666,593,000 |
Consider the following transcript of a user-namespaced shell running with root privileges (UID 0 within the namespace, unprivileged outside):
# cat /proc/$$/status | grep CapEff
CapEff: 0000003cfdfeffff
# ls -al
total 8
drwxrwxrwx 2 root root 4096 Sep 16 22:09 .
drwxr-xr-x 21 root root 4096 Sep 16 22:08 ..
-r... |
The behavior described in the question was a bug, which has been fixed in the upcoming Linux 4.4.
| Why can't a UID 0 process hardlink to SUID files in a user namespace? |
1,590,666,593,000 |
I am experimenting with capsh of libcap2-bin (1:2.32-1), but have found that I'm unable to use the == argument to re-exec capsh.
In particular, when I'm using the capsh's == argument, it's complaining that it couldn't execve(2) the /bin/bash shell?
Does anyone experiment a similar problem?
ls -la /bin/bash
-rwxr-xr-x ... |
The issue is that it's trying to re-execute itself as capsh (or whatever command name and path you started it with).
This is from strace capsh == --print:
execve("capsh", ["capsh", "--print"], [/* 20 vars */]) = -1 ENOENT (No such file or directory)
write(2, "execve /bin/bash failed!\n", 25execve /bin/bash failed!
) =... | Unable to use the `==` argument of `capsh` to re-exec it? |
1,590,666,593,000 |
I have trouble understanding the root-equivalence of CAP_CHROOT given the below template.
I understand that 1) means to create a directory structure, containing all dependencies (e.g. shared objects), whose root will be the target for chroot(2).
My question concerns the latter steps in the template:
Why is it necessa... |
It's not necessary, it's one way to do it.
By changing the root directory, you're invalidating the assumptions that components of the system can make.
/bin/su works on the assumption that the user database is in /etc/passwd//etc/shadow, that the libc (or any library it's linked to) is in some fixed location in /lib th... | Why is CAP_CHROOT equivalent to root? |
1,590,666,593,000 |
I am teaching an Operating Systems course and trying to wrap my mind around the fork/execve technique for creating new processes.
My current understanding is that a fork make a complete copy of the old process, establishes a new PID and parent/child relationship, but otherwise does very little else.
On the other hand,... |
Since we’re discussing Linux specifically (at least, I take it that’s what you want since you used the linux tag), the fork and execve manpages are the appropriate references; they list all the attributes which aren’t preserved. Most of this behaviour is specified by POSIX, but there are some Linux specificities.
The ... | What properties of an unprivileged process are preserved during an `execve` call? |
1,590,666,593,000 |
In my openSUSE 13.2 machine I can apply commands like setcap and getcap on some application. I moved that application to an openSUSE 12 machine that does not have capabilities installed. In the 13.2 machine I have packages libcap-ng0, libcap1, libcap1-32bit, libcap2 and libcap2-32bit installed, I installed the same pa... |
You need libcap-progs
sudo zypper install libcap-progs
| How to install Linux capabilities like setcap and getcap? |
1,590,666,593,000 |
Documentation says that capabilities are per-thread attributes. Indeed in any
/proc/[PID]/task/[LWP]/status
we can find capabilities, related to this thread:
CapInh: 0000000000000000
CapPrm: 0000000000000000
CapEff: 0000000000000000
CapBnd: 0000003fffffffff
CapAmb: 0000000000000000
But at the same time similar infor... |
Capabilities are indeed per-thread, and a thread can change its own capabilities (as allowed by the current capabilities) using capset without affecting other existing threads’ capabilities.
/proc/[PID]/status shows the capabilities for the thread matching the pid, or more accurately, the thread group id (which is the... | Are capabilities per-process or per-thread attributes? |
1,590,666,593,000 |
Is there any linux capability to enable normal users to write into root owned files like /etc/resolv.conf and /etc/fstab`?
|
No. There's a capability that allows accessing arbitrary files regardless of permissions (CAP_DAC_OVERRIDE), but it's almost equivalent to granting root access (if you can overwrite /etc/passwd, with most configurations, you're in): it's only useful for processes that perform a specific task (for example a backup prog... | Linux capabilities for modifying files owned by root? |
1,590,666,593,000 |
I've read in another answer that on Android the su binaries avoid needing to be setuid by using filesystem capabilities like cap_setuid. But then I tried to check this, and to my surprise, I found no capabilities set on my Magisk-enabled Android 8.0 system.
Here's how I checked:
Logged in via SimpleSSHD
scp'ed the f... |
It appears that /sbin/magisk.bin the non-root user launches doesn't spawn the root shell by itself. Instead, it communicates its request to magiskd, which is executed as root. And magiskd, after checking for permissions, executes the command requested. (Interestingly, magiskd is the same binary – /sbin/magisk.bin, but... | How does Magisk on Android work as su without setuid and capabilities? |
1,590,666,593,000 |
I'm trying to understand POSIX-capabilities principles, their transformation during execve() to be more specific. I'll put some quotes from documentation during my question:
P'(ambient) = (file is privileged) ? 0 : P(ambient)
P'(permitted) = (P(inheritable) & F(inheritable)) |
... |
I thought that this situation couldn’t arise, i.e. that the effective bit couldn’t be set if there is no permitted or inherited capability.
The behaviour seen with setcap appears to confirm this:
$ sudo setcap cap_chown=ep mybinary
$ getcap mybinary
mybinary = cap_chown+ep
$ sudo setcap cap_chown=e mybinary
$ getcap m... | How can an unprivileged file have an enabled effective bit? (POSIX capabilities) |
1,590,666,593,000 |
C code here:
#include <stdio.h>
#include <stdlib.h>
int main () {
printf("PATH : %s\n", getenv("PATH"));
printf("HOME : %s\n", getenv("HOME"));
printf("ROOT : %s\n", getenv("ROOT"));
printf("TMPDIR : %s\n", getenv("TMPDIR"));
return(0);
}
after doing:
gcc env.c -o printenv
setcap 'cap_dac_override+eip... |
OK, after some digging I found out the reason behind this. "TMPDIR" is among those special variables that ld. so ignores when CAP is set and the running user is non-root for security concerns. For more details please see the man page of ld. so: https://man7.org/linux/man-pages/man8/ld.so.8.html.
ENVIRONMENT to... | why a non root user call getenv on an exported variable returns nil |
1,590,666,593,000 |
Obviously, it can not rwx files that it doesn't have permission to. But I am talking about other "actions", I know of them is binding to ports with lower number than 1024. What else ?
|
Non-privileged processes can’t do a lot of things; on Linux, man 7 capabilities contains a comprehensive list.
Examples beyond your two include:
controlling auditing;
setting up BPF;
changing file ownership to arbitrary values;
opening raw sockets;
changing to arbitrary users and groups;
setting up arbitrary namespac... | Which actions a non-root process can't do? |
1,590,666,593,000 |
I'd like to set different capabilities to permitted and inherited sets of my file. Something like this:
sudo setcap cap_fsetid=ei mybinary
sudo setcap cap_kill=ep mybinary
However, the latter command overrides the former one. Is it even possible to can manage capabilities this way?
|
You can use getcap to get the list of currently set capabilities. Since these are whitespace separated you can add more like this:
sudo setcap first_capability=itsvalue executable_fname
sudo setcap "$(getcap executable_fname) newcap=value" executable_fname
(the capability list being whitespace separated: as cited in ... | Can two different sets of capabilities be set to one file? |
1,590,666,593,000 |
I'd like to run a service as a non-privileged user, but it needs to bind to a system port number (i.e. less than 1024), so I give it setcap 'cap_net_bind_service=+ep' <path for service>, all good.
Problem is, on startup, the service reads environment vars and for some reason it can't do that when it has cap_net_bind_s... |
I got to the bottom of it. In brief, the binary is using secure_getenv to access environment variables. This returns null, instead of accessing the variables, when the binary is run in "secure execution" mode (AT_SECURE=1). Having any capability set, causes it to run in this mode.
Confirm that the binary is using secu... | linux capabilities to read environment variables? |
1,590,666,593,000 |
I have an application that I want to be able to change the hostname in Linux. Currently doing so by running the hostname command. I don't want to set CAP_SYS_ADMIN either. I also don't want to edit /etc/hostname and reboot.
Is there a capability that only just allows changing the hostname? If not what are my optio... |
Setting the hostname in linux is done via the sethostname(2) syscall. And /bin/hostname is a bare wrapper around this syscall (and a few related syscalls). /etc/hostname is supposed to be read during the boot process by some script, who subsequently runs /bin/hostname to complish its job.
CAP_SYS_ADMIN is one of linux... | Set hostname without root, and without CAP_SYS_ADMIN |
1,590,666,593,000 |
I am developing a daemon started by upstart (Ubuntu 14.04) which needs to run as a non-privileged user (for security), but bind privileged port 443.
I am using setcap to set the CAP_NET_BIND_SERVICE capability for the executable (it's not a script). I am setting it in Permitted, Effective, and Inherited sets (setcap '... |
I'm now thinking this is a bug, and related to the way upstart starts services with "expect daemon" (i.e. services that fork twice upon startup). I notice that if I use strace on a process that is using capabilities(7) the capabilities are also ignored. I suspect that upstart, in order to determine the PID to wait on,... | Can't get upstart service to honor capabilities(7) |
1,590,666,593,000 |
There is a non-capability-aware program that requires at least 1) cap_sys_admin and 2) either cap_dac_override or cap_dac_read_search. This can be proven as follows:
sudo setcap 'all=ep cap_sys_admin-ep' ./binary` # ./binary doesn't work
sudo setcap 'all=ep cap_dac_override-ep' ./binary` ... |
So I think the answer to your question lies in what your program is doing. (In general, it always good to provide some simplified source code with your question to reproduce what you are seeing.)
I've quickly coded something up (in Go, because its slightly less code to generate debug output than C and libcap, and it p... | Reproduce setcap behavior with capsh |
1,590,666,593,000 |
I'm trying to run openvpn server within podman unprivileged container.
Openvpn needs to be able to manage network interfaces (i.e. create tun interface, assign IP address to it, bring it up). On my system (arch linux) within openvpn-server.service I noticed CapabilityBoundingSet and this made me to experiment and crea... |
I managed to get openvpn working by replacing ip within the container with bash script that always returns 0. I figured the only thing that openvpn tries to do is to set up tun0 and then assign it the ip address and bring it up. I decided to do this manually from the outside of container (as root) and so openvpn does ... | Run openvpn as non-root user |
1,590,666,593,000 |
I'm exploring the namespace feature of linux kernel, using Archlinux. But I got some message that I can't explain the reason, could anyone explain them to me?
xtricman‚öìArchVirtual‚è∫Ô∏è~ü§êexport LANG=en_US.UTF-8
xtricman‚öìArchVirtual‚è∫Ô∏è~ü§êunshare --propagation private -r bash
Could not get property: Access d... |
The command you are trying to run would change the root filesystem to read-only. It would affect outside the namespace as well. So you do not have permission.
You only want to change one specific mount, the mount inside the namespace. Use this command:
mount -o remount,bind,ro /
| Why do I get permission denied when using unshare? |
1,590,666,593,000 |
I have this C code that runs smartctl command and takes its output:
#include <iostream>
#include <cstdio>
#include <cstdlib>
using namespace std;
int main()
{
cout << "Hello ! " << endl;
FILE *fp;
char path[1035];
/* Open the command for reading. */
fp = popen("smartctl -A /dev/sda", "r");
i... |
According to this discussion CAP_SYS_RAWIO capability needs to be applied to smartctl executable.
| How to run smartctl as root without switching to root? |
1,590,666,593,000 |
I am working on an embedded system device which basically has root user.
I have a systemd service call.service which works fine with root access.
The service basically creates a few sockets and then interacts with the network device.
I want to launch this service with user UserA, and capabilities like net_raw and net_... |
does the trick with the following line.
AmbientCapabilities=CAP_NET_ADMIN CAP_NET_RAW
| Assign capability to systemd service and specific user |
1,395,769,777,000 |
I'm struggling with cpupower on ArchLinux. I want to set governor to ondemand or even to conservative.
First if I do $ sudo cpupower frequency-info --governors, I only get performance powersave.
So I look for available modules like this
ls -1 /lib/modules/`uname -r`/kernel/drivers/cpufreq/
...and I get
acpi-cpufreq.k... |
Assuming your governor is the intel_pstate (default for Intel Sandy Bridge and Ivy Bridge CPUs as of kernel 3.9). This issue is not specific to Arch, but all distros using the new Intel pstate driver for managing CPU frequency/power management. See Arch Linux CPU frequency scaling.
Theodore Ts'o wrote his explanation... | Setting CPU governor to on demand or conservative |
1,395,769,777,000 |
I'm trying to change the cpu frequency on my laptop (running Linux), and not having any success.
Here are some details:
# uname -a
Linux yoga 3.12.21-gentoo-r1 #4 SMP Thu Jul 10 17:32:31 HKT 2014 x86_64 Intel(R) Core(TM) i5-3317U CPU @ 1.70GHz GenuineIntel GNU/Linux
# cpufreq-info
cpufrequtils 008: cpufreq-info (C)... |
This is because your system is using the new driver called intel_pstate. There are only two governors available when using this driver: powersave and performance.
The userspace governor is only available with the older acpi-cpufreq driver (which will be automatically used if you disable intel_pstate at boot time; you ... | Can't use "userspace" cpufreq governor and set cpu frequency |
1,395,769,777,000 |
When I do
sudo watch -n1 cat /sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_cur_freq
I get 1.8 - 2.7 GHz. It never goes above 2.7.
And when I do
watch -n1 "cat /proc/cpuinfo | grep MHz"
I get 768 MHz - 1.8 GHz. It never goes above 1.8.
Anyone know what is going on?
|
Most CPU's now include the ability to adjust their speed to help in saving on battery/power usage. It's typically called CPU frequency scaling. The realtime speed of the CPU is reported by this:
$ sudo cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq
The absolute (max) CPU speed is being reported by this:
$ ... | Why do cpuinfo_cur_freq and /proc/cpuinfo report different numbers? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.