cPanel files with no owner?
-
Usually this happens if files are left after a user is removed. For example if you terminated a cpanel account but it's files were left somewhere else. I see this with session files in /tmp and stuff. 'ls' will show them as a numeric UID/GID instead of a name, which is what find is searching for (files owned by a numeric UID that no longer has a username/account associated with it). Looking at those particular files I wouldn't really be concerned. 0 -
Thanks @quizknows ! I don't suppose there is some way to confirm whether they actually were files belonging to a removed user? :p I assume if they were, I could then also remove them..? 0 -
I don't suppose there is some way to confirm whether they actually were files belonging to a removed user? :p I assume if they were, I could then also remove them..?
Hello, The files in the image you provided are located within the /home/.cpanm/work directory. There's a thread on the purpose of those files at:0 -
Thanks @quizknows ! I don't suppose there is some way to confirm whether they actually were files belonging to a removed user? :p I assume if they were, I could then also remove them..?
You run into an interesting situation there. If you have old copies of /etc/passwd you could find the numeric UID and you'd know who owned those files in the past. Unless you see things in the list that look like sensitive data I would not sweat it. One thing you can run into is if you terminate a user from a linux system, then add one in the future that gets assigned the same numeric UID, it would inherit ownership of the old files. However, on cPanel, you should not run into this unless you manually use "useradd". If you remove a cpanel account and then make a new one, the new one gets new numeric UID/GID and thus will not inherit any old files.0 -
Hi @cPanelMichael, Thanks for that link. If they are auto-regenerated, why would they have no owner? Shouldn't cPanel be the owner? 0 -
Thanks for that link. If they are auto-regenerated, why would they have no owner? Shouldn't cPanel be the owner?
That's in reference to when the directory is removed. If you remove the directory, then the required files would generate automatically as needed. Thank you.0 -
Hate to be a stickler but how come they have no owner though? Did they belong to someone I removed on the system, or is it the case with your test system too? :p 0 -
Hate to be a stickler but how come they have no owner though? Did they belong to someone I removed on the system, or is it the case with your test system too? :p
Hello, The likely reason is the user responsible for installing that specific Perl module no longer exists on the system. In the image you attached, it doesn't show the full path to those specific files, or the UID/GID. Could you verify where those files are stored (E.g. /home/.cpanm, /root/.cpanm/, /home/$username/.cpanm/) and post the output of the "stat /path/to/file" command for one of the files? Thank you.0 -
Hello, The likely reason is the user responsible for installing that specific Perl module no longer exists on the system. In the image you attached, it doesn't show the full path to those specific files, or the UID/GID. Could you verify where those files are stored (E.g. /home/.cpanm, /root/.cpanm/, /home/$username/.cpanm/) and post the output of the "stat /path/to/file" command for one of the files? Thank you.
Hi @cPanelMichael, It's under / so the path is /.cpanm/ Here's the stat for a directory and a regular file in there. Hopefully it points us the right way :)[root@srv /]# stat /.cpanm/work/1462897870.6158/parent-0.234 File: `/.cpanm/work/1462897870.6158/parent-0.234' Size: 4096 Blocks: 8 IO Block: 4096 directory Device: 9810b6f1h/2551232241d Inode: 262365 Links: 5 Access: (0755/drwxr-xr-x) Uid: ( 1000/ UNKNOWN) Gid: ( 1000/ UNKNOWN) Access: 2016-12-13 10:16:36.714930200 +0800 Modify: 2016-05-11 00:31:11.118480000 +0800 Change: 2016-05-20 06:06:50.938233819 +0800 [root@srv /]# stat /.cpanm/work/1462897870.6158/parent-0.234/META.json File: `/.cpanm/work/1462897870.6158/parent-0.234/META.json' Size: 1015 Blocks: 8 IO Block: 4096 regular file Device: 9810b6f1h/2551232241d Inode: 265689 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 1000/ UNKNOWN) Gid: ( 1000/ UNKNOWN) Access: 2016-05-20 06:05:54.764077000 +0800 Modify: 2015-05-28 01:08:13.000000000 +0800 Change: 2016-05-20 06:05:55.716014045 +08000 -
Hi @cPanelMichael, Sorry for wasting your time! I just learned that cpan/cpanm have nothing to do with cPanel. I thought that was a cPanel directory - My apologies. I've removed the directory, I'm quite certain it won't return in that location but if it does then you've already explained why. Thanks again for your help! :) 0
Please sign in to leave a comment.
Comments
10 comments