adding new directory

Discussion in 'Installation/Configuration' started by kwickcut, Dec 22, 2023.

  1. kwickcut

    kwickcut Member HowtoForge Supporter

    i would like to add a new directory to


    /var/www/clients/client1/web1

    called ftp or whatever i really dont care about the name

    i have tried everything i can find and nothing works every time i create the new directory it adds it to the main directory for the server

    Code:
     cd /var/www/clients/client1/web1 
    then i run

    Code:
      sudo mkdir /ftp 
    so it will create
    /ftp

    and not
    /var/www/clients/client1/web1/ftp


    how can i do this..

    i also tried adding this directory under apache for this site and still nothing

    thanks in advance

    kwick
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    If you do
    Code:
      sudo mkdir /ftp 
    it indeed creates directory /ftp, as that is exaclty what that command is commanded to do.
    If you want to create a subdirectory to current working directory, leave out the / from the beginning of the directory name.
    But if current working directory is
    Code:
    cd /var/www/clients/client1/web1 
    I believe you should not create subdirectory there, it can not be accessed from the website. The files for website client1/web1 are in subdirectory web there. There already is subdirectory web/private, perhaps you could use that instead of creating new directories?
    Or create
    Code:
    mkdir web1/web/ftp
    if that is more suitable.
    https://forum.howtoforge.com/thread...or-a-first-time-linux-user.83782/#post-399369
     
  3. kwickcut

    kwickcut Member HowtoForge Supporter

    thank you for the reply. i do not want the directory to be accessed from the web directory. i want to secure it so it can not be seen or reached from the web directory trying to make it secure from people who try to find stuff in web directories

    this is why i changed directories
    Code:
     cd /var/www/clients/client1/web1 
    then i tried to make the directory
    Code:
     sudo mkdir /ftp
    now my understanding is that should make
    Code:
     /var/www/clients/client1/web1/ftp 
    it says it is made but it is not showing

    thank you once again i should have been more clear on what i was trying to do



    kwick
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    The directory /var/www/clients/client1/web1 is protected with the immutable attribute and you should not add any directories there manually. If you want to have a directory outside of the web directory, then create it in the private folder. e.g.:

    mkdir /var/www/clients/client1/web1/private/ftp
     
  5. kwickcut

    kwickcut Member HowtoForge Supporter


    thank you for the reply. at first i did use /private. but whqt i was doing is using it as a mount point

    Code:
     UUID=8056f03c-69c7-4255-9df6-b693    /var/www/clients/client1/web1/private 
    everything was working great until another /private directory was made and i figure it was auto generated because i did not do it.. so now when i made a new ftp client and set there directory to
    Code:
    /var/www/clients/client1/web1/private
    it would connect them to the new private directory and not the one i had used as a mount point to the drive..

    but thank you for the info i will make a mount point inside of private



    kwick
     
    Last edited: Dec 23, 2023
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    The /private directory is not intended to be a mount point, its a directory managed by ISPConfig. You should consider to rebuild your setup, restore the original private directory, and if you want to mount an external directory, then create a subdirectory inside the private directory.
     
    kwickcut likes this.

Share This Page