Skip to main content
added 214 characters in body
Source Link
marc
  • 2.5k
  • 2
  • 18
  • 25

The command cp -P doesn't apply to your needs. You are using uppercase argument letter -P which is used to never follow symbolic links.

What you want to use is lowercase to preserve timestamps: cp -p 


As described in the comment section of the question, using the correct gid and uid solved the problem:

sudo mount -t cifs //mynas/folder /home/mnt/nas/ -o user=username -o gid=1000,uid=1000

The command cp -P doesn't apply to your needs. You are using uppercase argument letter -P which is used to never follow symbolic links.

What you want to use is lowercase to preserve timestamps: cp -p

The command cp -P doesn't apply to your needs. You are using uppercase argument letter -P which is used to never follow symbolic links.

What you want to use is lowercase to preserve timestamps: cp -p 


As described in the comment section of the question, using the correct gid and uid solved the problem:

sudo mount -t cifs //mynas/folder /home/mnt/nas/ -o user=username -o gid=1000,uid=1000
Source Link
marc
  • 2.5k
  • 2
  • 18
  • 25

The command cp -P doesn't apply to your needs. You are using uppercase argument letter -P which is used to never follow symbolic links.

What you want to use is lowercase to preserve timestamps: cp -p