Hi,

On Sid (amd64), I am facing the following:

$ ./test.sh
-rwxr-x--- 1 patrice patrice 300 Jul  9 10:46 ./test.sh
option: -p
cp: preserving permissions for '/tmp/test.sh': Operation not supported
exitcode: 1
-rwxr-x--- 1 patrice patrice 300 Jul  9 10:46 /tmp/test.sh
option: --preserve=mode
cp: preserving permissions for '/tmp/test.sh': Operation not supported
exitcode: 1
-rwxr-x--- 1 patrice patrice 300 Jul  9 10:47 /tmp/test.sh
option: --preserve=timestamps
exitcode: 0
-rwxr-x--- 1 patrice patrice 300 Jul  9 10:46 /tmp/test.sh
option: --preserve=ownership
exitcode: 0
-rwxr-x--- 1 patrice patrice 300 Jul  9 10:47 /tmp/test.sh

It says that the operation is not supported but still the mode of the
copy is ok.
Is there an issue somewhere?

Thanks,
Patrice

--
$ apt-cache policy coreutils
coreutils:
  Installé : 9.4-3.1
  Candidat : 9.4-3.1
 Table de version :
 *** 9.4-3.1 500
        500 https://deb.debian.org/debian sid/main amd64 Packages
        100 /var/lib/dpkg/status

$ mount | grep /tmp
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,nr_inodes=1048576,inode64)

$ cat /etc/tmpfiles.d/tmp.conf
D /tmp 1777 root root -

$ cat test.sh
#!/usr/bin/sh

export LANG=C
ls -l ./test.sh
echo "option: -p"
cp -p ./test.sh /tmp
echo "exitcode: "$?
ls -l /tmp/test.sh
rm /tmp/test.sh
for p in mode timestamps ownership ; do
echo "option: --preserve=$p"
cp --preserve=$p ./test.sh /tmp
echo "exitcode: "$?
ls -l /tmp/test.sh
rm /tmp/test.sh
done

Reply via email to