how to remove files with +s

in qemu i installed 13.1 version with a single 5GB disk. there is only a root partition (ufs) and everything else mounted under it. i added a second storage of 5G size also. in single user mode, i copied (cp -Rp /usr/* /mnt) usr directory contents, renamed existing "/usr" to "/usr-old", created a new "/usr" directory and in "/etc/fstab" added the new hd using new directory "/usr" as the mount point. rebooted.

that worked. problem is, i can't get rid of some files from "/usr-old" directory like login as they have "r-s-r-x-r-x" permissions. tried "chmod -s" but didn't worked. the error is permission denied when i try to delete this files. they are all owned by root and i'm doing the deletion, in single user mode, as root.

how else to remove them?
 
that worked. problem is, i can't get rid of some files from "/usr-old" directory like login as they have "r-s-r-x-r-x" permissions. tried "chmod -s" but didn't worked. the error is permission denied when i try to delete this files. they are all owned by root and i'm doing the deletion, in single user mode, as root.
's' certainly isn't the problem here, the problem is there's no 'w' (write permission) for anyone. So, add it. Additionally, as Alain De Vos said, they probably also have the immutable flag, which needs to be removed with chflags(1).

That all said, moving /usr to different storage doesn't seem too useful, after all, it's part of base. /usr/local (where all ports/packages are installed by default) might make more sense.
 
's' certainly isn't the problem here, the problem is there's no 'w' (write permission) for anyone. So, add it. Additionally, as Alain De Vos said, they probably also have the immutable flag, which needs to be removed with chflags(1).

That all said, moving /usr to different storage doesn't seem too useful, after all, it's part of base. /usr/local (where all ports/packages are installed by default) might make more sense.
you are right but i don't want to split "/usr" directories into multiple locations.
 
Back
Top