NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.

Forum Discussion

Retired_Member's avatar
Retired_Member
May 13, 2018
Solved

Removing deleted user Home Folders/Directories

Hi all,   I've read this: https://community.netgear.com/t5/Using-your-ReadyNAS/Deleting-old-home-directories/m-p/1036582   and it seems strange that when creating and removing a user, the hom...
  • Retired_Member's avatar
    Retired_Member
    May 15, 2018

    StephenB wrote:

    You are saying that

    • there is no user account for the home folder you wish to remove?
    • there is no subvolume in /data/home for that user

    but there is an ordinary folder for that user???  And that file folder includes the ssh key file that you can't delete?

     

    /home is a mount point - did you try deleting the file from /data/home as well?

     

    user1 should be showing up in the subvolume list of course.  Maybe also try using btrfs subvolume delete /data/home/user1 even though it doesn't seem to be listed there???

     

    Maybe also try rebooting the NAS.

     


    1) Yes, there is no user account for the home folder I wish to remove (neither Web GUI or SSH/Shell)

    2) Yes, there is no subvolume in /data/home for that user (other than a  hidden .ssh folder, which contains the 0-byte ssh_authorized_keys file)

     

    I tried from /home and /data/home, neither worked. When the user gets removed from the webGUI, then users' home folder resorts to its "<UID>:users" group/user permissions drwxrwx--- 1. I can't delete it from webGUI nor SSH.

     

    I can't btrfs delete it either:

    root@NAS:/data/home# btrfs subvolume delete /data/home/user1/
    ERROR: not a subvolume: /data/home/user1/

     

    The only thing I can think of is the user/group its in, but as root I should be able to over-ride it.

     

    root@NAS:/data/home# ls user1/ -al
    total 0
    drwxrwx--- 1 105 users 8 May 13 12:18 .
    drwxr-xr-x 1 admin admin 200 May 13 13:35 ..
    drwx------ 1 105 users 38 Apr 28 15:05 .ssh
    root@NAS:/data/home# ls user1/.ssh -al
    total 0
    drwx------ 1 105 users 38 Apr 28 15:05 .
    drwxrwx--- 1 105 users 8 May 13 12:18 ..
    -rw------- 1 105 users 0 Apr 28 15:05 ssh_authorized_keys

     

    There appear to be no additional attributes or special permissions for the directory, but there are for the file:

    ./ssh_authorized_keys Immutable

     

    I'm guessing this is the reason I can't delete it....remove it and it seemed to have worked. Folder and its contents are now deleted.

     

    Not sure if this cause issues, not even sure what set the attribute.

     

NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology! 

Join Us!

ProSupport for Business

Comprehensive support plans for maximum network uptime and business peace of mind.

 

Learn More