recentpopularlog in

kme : gnu   39

GNU Core Utilities Frequently Asked Questions -
The GNU chown program will change the ownership if the operating system it is running upon allows it. If you can’t change file ownership then it is the operating system which is restricting you and not the chown program.

Actually, the GNU chown command does not know if this is the policy of the system or not. It calls the kernel system call chown() just like any other program (e.g. perl, ruby, etc.) If the OS allows it then it will change the ownership of the file. Different systems handle this differently. Traditional System V Unix systems allow anyone to give a file away to other owners. On those systems GNU chown does change the ownership of files.

But on most modern systems BSD semantics are followed and only the superuser can change the ownership of the file. The problem for documenting this is that GNU chown does not know which it will be running on. It could be one or it could be the other. Or it might even be running on a system without the concept of file ownership at all! This is really an OS policy decision and it is hard to track documentation to be different on different systems. But the documentation must be independent of operating system.

The reason an operating system needs to restrict changing ownership is mostly threefold.

A user can create files that they cannot remove. With the old semantics it was possible for normal users to create situations that only the superuser could fix, such as creating a non-writable directory of files and then giving the ownership away. Since they no longer own the files they can’t change them, nor can they remove them. This is commonly a problem when untaring files that other people created with restrictive file permissions. The new semantics avoid this problem entirely. Therefore most systems today have been changed to disallow giving file ownership away. But as noted it has not always been that way.
Additionally systems need to restrict who can remove files from system temporary directories such as /tmp. Otherwise anyone could remove any file there which might disrupt system processes. Some programs might even have security issues associated with this. Therefore modern systems set the ’sticky’ bit on /tmp. This is the ’t’ bit. On directories this prevents users from removing or renaming a file unless they own the file or directory. The reason this is important is that if chown is allowed then /tmp is another place that a file could be created by a user, chowned, and then could not be removed by the user. A sticky /tmp and a restricted chown policy go together. If you have one then you should have the other as well.
People have used this to avoid disk space quota restrictions. Give the file to someone either with disk quota to spare or without any quota restrictions, like root. You can always copy the files back and then you own them again. This effectively defeats any quota system if allowed. Also, you can deny someone else service with a denial of service attack by using all of their quota until they cannot create any files. You use up their quota by chowning files to them someplace where they cannot find them.
gnu  linux  coreutils  chown  permissions  unix  sothatswhy 
7 weeks ago by kme
EmacsWiki: Regular Expression Help |
GNU Emacs (and GNU find) regexps *do* support alternates, but you have to escape *both* the parens and the pipe symbol.
emacs  gnu  gnufind  regexp  syntax  solution 
february 2019 by kme
Various Licenses and Comments about Them - GNU Project - Free Software Foundation
ISC License (#ISC)

This license is sometimes also known as the OpenBSD License. It is a lax, permissive free software license, and compatible with the GNU GPL.

This license does have an unfortunate wording choice: it provides recipients with "Permission to use, copy, modify, and/or distribute this software…" This is roughly the same language from the license of Pine that the University of Washington later claimed prohibited people from distributing modified versions of the software.

ISC has told us they do not share the University of Washington's interpretation, and we have every reason to believe them. Thus, there's no reason to avoid software released under this license. However, to help make sure this language cannot cause any trouble in the future, we encourage developers to choose a different license for their own works. The Expat License and FreeBSD License are similarly permissive and brief.
licensing  opensource  gpl  gnu  license  reference  devel 
march 2016 by kme
Richard Stallman’s GNU Manifesto Turns Thirty - The New Yorker
He paused for a moment, then added, “The point is, even though it’s sad to see people being foolish, there’s no use giving up. Nothing good can come of giving up. That just means you lose completely, right away.”
rms  freesoftware  gnu  persistence  perspective  opensource  software  freedom 
march 2015 by kme
EmacsWiki: Regular Expression
GNU 'find' uses this syntax by default.

See also:

Also: Emacs REs *do* support alternatives with the pipe character, but both the pipe and the parens have to be escaped (ref.:
find  regex  regexp  emacs  reference  coreutils  gnu  sysadmin  shell  regularexpression  syntax  essential 
december 2014 by kme
CentOS • View topic - /lib/ version `GLIBCXX_3.4.15' not found
Solution for me was 'module load gcc/4.8.1', since the system default C compiler didn't support the API version expected by the binary that was throwing up this error message.
libstdc++  cplusplus  gnu  compiler  errormessage  solution 
november 2014 by kme
MinGW-users - ld not configured to use sysroots
> C:\msys\mingw\bin/ld.exe: this linker was not configured to use sysroots
> collect2: ld returned 1 exit status
> Any ideas on how to solve this?
> Do I need to recompile the binutils and enable some switch for this?

When you configure binutils, use the --with-sysroot option. This is
how binutils (and gcc) should pretty much always be built these days,
with the current configury system that is present in sourceware's top
level configure. You point binutils to the location of the sysroot,
and you get bonus points if the sysroot is equal to or decendent from
your prefix.
gnu  compiler  toolchain  ld  errormessage  maybesolution 
june 2014 by kme
Using - GNU libiberty
Passing --enable-install-libiberty to the configure script when building libiberty causes the header files and archive library to be installed when make install is run. This option also takes an (optional) argument to specify the installation location, in the same manner as --prefix.

You'd think this would've worked. But I tried like all hell to get 'make install' to put the .h and .a where they belong, and ended up copying them over manually.
solution  grive  build  toolchain  gnu  library  errormessage  cmake 
may 2014 by kme
c++ - GCC -fPIC option - Stack Overflow
Position Independent Code means that the generated machine code is not dependent on being located at a specific address in order to work.

E.g. jumps would be generated as relative rather than absolute.


PIC: This would work whether the code was at address 100 or 1000

111: NOP

Non-PIC: This will only work if the code is at address 100

101: JUMP_IF_EQUAL 111
111: NOP

EDIT: In response to comment.

If your code is compiled with -fPIC, it's suitable for inclusion in a library - the library must be able to be relocated from it's preferred location in memory to another address, there could be another already loaded library at the address your library prefers.
linux  elf  gnu  gcc  compileroptions  build  toolchain  devel  solution  answer 
may 2014 by kme
Why Software Should Be Free - GNU Project - Free Software Foundation (FSF)
"The associated psychosocial harm affects the spirit of scientific cooperation, which used to be so strong that scientists would cooperate even when their countries were at war. In this spirit, Japanese oceanographers abandoning their lab on an island in the Pacific carefully preserved their work for the invading U.S. Marines, and left a note asking them to take good care of it."
gnu  fsf  freesoftware  philosophy 
january 2013 by kme

Copy this bookmark:

to read