The +
at the end indicates the presence of an access control list. An ACL on a file gives additional users or groups specific permissions, in addition to the traditional unix permissions which only distinguish between the owning user, the owning group and others. You can use getfacl
to see the ACL on a file and setfacl
to set it.
cp -a
would copy the ACL if it could. The reason it can't is that the target filesystem doesn't support ACLs or is mounted without ACL support.
Here, this doesn't really matter. /dev
isn't an on-disk filesystem anyway, you shouldn't copy it, and likewise you shouldn't copy /proc
, /sys
and other non-disk filesystems. Run cp -ax
to perform a copy without recursing into other filesystems.
cp
is often not the best way of transfering an existing installation to a new disk. It would be easier to copy the filesystem wholesale, then enlarge it to fill the target partition. In a nutshell:
cat </dev/sdy1 >/dev/sdz1
resize2fs /dev/sdz1
where /dev/sdy1
is the partition containing the existing installation and /dev/sdz1
is where you want to copy the system on the larger disk. Be very careful when typing this command as this will irrecoverably erase the target partition.
After you've copied the files, you'll need to set up the bootloader on the new disk. grub-install /dev/sdz
should do the trick, but you may need to write a /boot/grub/device.map
first to convey that the new disk is going to be the primary disk. If you have trouble with that, the easiest (if hardly the most convenient) way is to put the new disk in its final place, then boot from an Ubuntu CD/USB and tell the installation program to repair the bootloader.
With symlinks, tools have two things they can do:
- Treat the symlink as a symlink ("preserving its nature"), or
- Treat the symlink as the type of file that it points to.
Saying that -H
"preserves its nature" is not a contradiction. Consider the alternative. If you use -L
, any symlinks cp
finds will be opened, and their contents copied to the target file name. So the source was a symlink, but its copy is not a symlink. So it "lost its nature as a symlink".
Consider
$ mkdir subdir
$ echo "some contents" > subdir/file
$ ln -s file subdir/link
# definition of "list", the abbreviated ls -l output used below
$ list() { ls -l "$@" | \
awk '$0 !~ /^total/ { printf "%s %s\t%s %s %s\n", $1, $5, $9, $10, $11 }' ; }
$ list subdir
-rw-rw-r-- 14 file
lrwxrwxrwx 4 link -> file
$ cp -rH subdir subdir-with-H
$ list subdir-with-H
-rw-rw-r-- 14 file
lrwxrwxrwx 4 link -> file
$ cp -rL subdir subdir-with-L
$ list subdir-with-L
-rw-rw-r-- 14 file
-rw-rw-r-- 14 link
Best Answer
Just for you I played with Veracrypt(never heard the name before :D).
Have you formatted the drive as FAT? Then thats your problem. When Veracrypt asks you, format it as NTFS instead of FAT and then try again.
FAT32 unfortunately does not support owner, permissions or symlinks. That is why you are getting an
Operation not permitted
error. Note that this error is not “permission denied”: “operation not permitted” often means “operation not supported”, i.e. nobody can do this.