Sorry for my direct answer. ---------- Forwarded message --------- De : Patrice Duroux <patrice.dur...@gmail.com> Date: mar. 9 juil. 2024 à 14:07 Subject: Re: question related to cp (-p) and /tmp To: Thomas Schmitt <scdbac...@gmx.net>
Hi Thomas, Thanks! Here is for the source file of the copy: $ getfacl test.sh # file: test.sh # owner: patrice # group: patrice user::rwx group::r-x other::--- I do not see any specific ACL here. And here it is for your suggestion: $ touch /tmp/x $ setfacl -m u:1234:w /tmp/x $ getfacl /tmp/x getfacl : suppression du premier « / » des noms de chemins absolus # file: tmp/x # owner: patrice # group: patrice user::rw- user:1234:-w- group::r-- mask::rw- other::r-- (sorry for the french output) Le mar. 9 juil. 2024 à 13:18, Thomas Schmitt <scdbac...@gmx.net> a écrit : > > Hi, > > Patrice Duroux wrote: > > option: --preserve=mode > > cp: preserving permissions for '/tmp/test.sh': Operation not supported > > exitcode: 1 > > [...] > > It says that the operation is not supported but still the mode of the > > copy is ok. > > Maybe it sees ACL at the source file and your /tmp filesystem cannot > do ACL ? > > Try with setfacl(1) whether files in the /tmp directory accept non-trivial > ACLs, like > > touch /tmp/x > setfacl -m u:1234:w /tmp/x > > The inquiry by > > getfacl /tmp/x > > should then report among others a line: > > user:1234:-w- > > > Have a nice day :) > > Thomas >