Filesystem
From Apis Networks Wiki
Contents |
Overview
Your filesystem base is located under /home/virtual/siten/fst where n is an integer between 1 and 999. This value is listed under the Site Number field of the dashboard. A symbolic link named /home/virtual/domain where domain is the primary domain name is linked to /home/virtual/siten/fst for convenience reasons. This may be used with applications that do not run in a jailed filesystem.
Filesystem Jailing
If you have logged into the server via FTP or used the File Manager, then you would note your directory /home/example does not resemble /home/virtual/siten/fst/home/example. Certain services are jailed for security purposes. A jail ensures maximum security by locking others from your snooping through your filesystem on the server.
- Smart Jail
- FTP
- SSH as well as any programs started from within the shell
- SpamAssassin
- Control panel API access
- WebDisk
- CGI & FastCGI
- E-mail delivery through maildrop (different jailing restrictions apply)
- Other Jailing Methods
Managing Files
Deleting files owned by other users
Due to limitations of how users are structured (non-root), you will need to use the File Manager or WebDisk to remove files owned by other users on your account. You may also change ownership over to your user through the control panel, then delete through FTP or SSH.
Problems
Unable to remove files
Certain files may be undeletable by the main user from within the shell or FTP. See "Deleting files owned by other users" for workarounds.
All files created from a PHP-based application, e.g. Gallery pictures or WordPress image uploads, are changed to your username every night. This script iterates through all of the apache-owned files and changes ownership over to your username plus adds ACL entries to allow only the user apache write access. Files created during the day will be deletable on the following day. Your disk quota may fluctuate as a result of nightly filesystem updates.
Symbolic link traversal
Symbolic links created as an absolute path from within the shell through the ln(1) command are unparseable through the Certain services, most notably the Web server. Unexpected errors such a "403 Forbidden", "500 Internal Server Error" or CGI timeouts may occur as a result of specifying an absolute path. Recreating the link as a relative symbolic link or through the File Manager will resolve the problem.
An absolute path is a path that refers to a specific (absolute) location on the filesystem such as /var/www/html. A relative path is a path on the filesystem that is relative to the current working directory, e.g. ../../var/www/html.
- Example
- A file named foo located in
/home/debugis a symbolic link. The directory to which it refers is../../var/www/html. foo translates to/home/code/../../var/www/html, which in turn resolves to/var/www/html.
- Moving var to another directory, which is two directories deep on the filesystem, such as
/var/wwwwill work, because../../backtracks two directories.
- Moving
footo another directory which has a directory depth that is not equal to 2 (home + debug = 2 directories deep) will fail. Relocating the symbolic link foo to/var/www/htmlwill change the directory to whichfoorefers (/var/www/html/../../var/www/html->/var/var/www/html). The symbolic link has remained the same; however, the directory depth has changed creating a new target (/var/var/www/html).
Disk Quotas
Nightly Quota Drift
Disk quotas may increase overnight as a result of filesystem reconcilement. Files created by a PHP/Tomcat script are converted over to the user id of the directory in which the file was created. For example, a file created under /var/www/html would be counted against the primary user where-as a file created under /home/example/public_html would be counted towards the user example.
Upgrading disk space
Disk space may be upgraded by filing a trouble ticket from within the control panel. We only accept upgrade requests at a monthly interval. Disk space increases are calculated as <package price per month>/<disk space in package>*55% = <price per additional MB of space>. For example, assuming you had the Minimalist package and were paying $4.95 per month for 700 MB of disk space, the price would be calculated as:
$4.95/700 MB * 55% = $0.00388929 per MB
An additional 1 GB (1,024 MB) would thus cost 1024*$0.00388929 ~ $3.98/month
