The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

virtfs using space on accounts

Discussion in 'General Discussion' started by Planet_Master, Nov 23, 2003.

  1. Planet_Master

    Planet_Master Well-Known Member

    Joined:
    Apr 18, 2002
    Messages:
    233
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    New Yorker
    I see in the virtfs directory (I know not to delete!) there are several usernames and of course all the files inside each username. The problem is the directory is using up all the customers diskspace and after running
    find / -user username
    I see he is the owner of all these files but really shouldn't be. Its taking up over 140MB of his accounts space!

    Who should own these files? root? How can I take that added space away from his account?

    Looking within the virtfs/username directory I see the following:
    bin
    dev
    etc
    home
    lib
    proc
    tmp
    usr
    var

    Now I know not to delete any system files but how about the home file? It is the cause of all the extra space. Its like he has 2 home directories. If I delete this will it delete his true home?

    I really do not like this virtfs file, it is way to dangerous to be in this directory and certainly makes using jailshell less appetizing and I didnt ask to have virtual servers set up on my box taking up tons of extra space.
     
    #1 Planet_Master, Nov 23, 2003
    Last edited: Nov 24, 2003
  2. chakky

    chakky Well-Known Member

    Joined:
    Sep 22, 2002
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    6
    beware deleting virtfs

    Hi,

    I had a similar problem.A user complained, and seeing that the cause was so , I changed the person's shell to bash to check and see if the virtfs goes.
    :(.But it didnt

    Then seeing that just like the public_html etc are symbolic and active only when they login, I foolishlly took it on, to change its code and see if I could add a few more functions such as sftp etc which users seemed to miss a lot when I gave them the chroot shell, ..aaahh..next thing, more space gets used up for the individual user.Thinking they were all additional copies, I did a "rm -rf /home/virtfs/username"
    and had my whole system files destroyed and had to reinstall the OS on the system.

    So be careful man:)
     
  3. Planet_Master

    Planet_Master Well-Known Member

    Joined:
    Apr 18, 2002
    Messages:
    233
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    New Yorker
    I know, already learned that lesson on another box, good thing it was empty because of transfers to a newer server. This is really BS because who asked for virtual accounts to be setup on server? I didnt. This is also a dangerous security risk where a malicious user with enough knowledge can delete your entire file system. I have been reading up on this all night with searches on Google and quite frankly this is a bad thing for Cpanel server owners.

    So the question still remains, how to remove that disk space from the users account?
     
  4. chakky

    chakky Well-Known Member

    Joined:
    Sep 22, 2002
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    6
    did u try chowning to root the /home/virtfs folder.That might solve it.You can risk it since your box like u said is empty.
    I burnt my fingers too bad to test or even touch the virtfs folder on my live servers
     
  5. Planet_Master

    Planet_Master Well-Known Member

    Joined:
    Apr 18, 2002
    Messages:
    233
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    New Yorker
    No the empty server is the one I screwed not knowing what the hell that file was. Of course I do now and don't dare fool with it.
    The thing that kills me is Cpanel installed this but doesn't give support when a problem like this occurs.
    See I don't think chowning to root is wise because the home folder of the member is all his files and he does own them so changing ownership to root could render his Cpanel inaccessible.
    Honestly this is bullshit and to install software on my machine that I didn't ask for and especially that is so dangerous is inexcusable.

    I wonder how many members know about the severity of this file and its implications? Did the Cpanel team every really notify us about this? I want this crap off my server, I pay good money for this box and to install this dangerous software is criminal.:mad:
     
  6. chakky

    chakky Well-Known Member

    Joined:
    Sep 22, 2002
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    6
    Hi,

    I didnt mean all files. only the ones inside /home/virtfs which contains all the shared files.

    This is a topic I addressed earlier and maybe sometimes Nick and all are too busy to notice the after effects of it.
     
  7. Planet_Master

    Planet_Master Well-Known Member

    Joined:
    Apr 18, 2002
    Messages:
    233
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    New Yorker
    I understand what you meant but this is a live server thats having the difficulties. Seems 4 accounts are now effected and it is spreading. I am amazed at the lack of interest in this because this is going to cause big troubles down the road and I dont wanna hear people screaming about it later when it can be addressed now. Poor fools dont even realize what has been done to their servers.
     
  8. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    Well looking at our servers none of the files and directories are owned by the user. Root owns everything in there and only the group is set to the user.

    If the files and directories are owned not by root, then it is something system specific. I checked our servers along with two other companies we do server support for and none have this issue. That is why the interest may seem low as this is not an issue for some.
     
  9. Planet_Master

    Planet_Master Well-Known Member

    Joined:
    Apr 18, 2002
    Messages:
    233
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    New Yorker
    I wasn't having problems either, tell you the truth I didn't even know about the virtfs until I ran the find / -user username command because a users account was way over the disk allotment but the files in account didn't match up. Figured I would find some red hat files mistakenly assigned to him, its happens, and then I would just chown. But this is different. I am going to chown to root and see what happens, worst case I think would be to chown back if user cannot enter account.

    And yes you say it hasn't been a problem but when it does become a problem, its not the run of the mill directory to be toyed with. Were talking wiping your box clean and some lesser knowledgeable people are going to make this mistake. Lord knows I did.

    But the real question is who decided that I wanted virtual hosting on my server? This is kinda an invasion of my rights cause I didn't and do not want this software on my servers. Will Cpanel pay when disaster strikes? I think they should be held accountable because they decided to insert this without my knowledge.

    I guess the real issue is this is much more bad then good for server management so why even consider it?
     
  10. Planet_Master

    Planet_Master Well-Known Member

    Joined:
    Apr 18, 2002
    Messages:
    233
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    New Yorker
    Well I chowned to root and it seems to have fixed the problem so I can be at ease for now, until something more serious comes from this directory and I have a bad feeling it will.
     
  11. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    I do a agree with for the most part, I was one of the first to warn of the "Do Not Delete" There is another old thread just on this.

    You though do not need to use the virtfs, it gets used because of using the jailed shell. If you do not use the jailshell and just bash (if a user really needs ssh) then the virts area does not get used. You should notice that not all accounts are listed in there too, we only have 15 listed in there and they are the ones that have the jailshell, all other accounts have noshell.

    This though has been on servers since cpanel 6.x #8
     
  12. Planet_Master

    Planet_Master Well-Known Member

    Joined:
    Apr 18, 2002
    Messages:
    233
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    New Yorker
    I know its used for jailshell but to think you are trying to secure your system by using jailshell and then realize a even more dangerous application is used to make it work is kinda unsettling...lol

    See I have no problem with Cpanel improving things but this seems kinda out there, if you know what I mean. Not worth the trip.
     
Loading...

Share This Page