<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.ulyssis.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Arnodb</id>
	<title>ULYSSIS documentation - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://docs.ulyssis.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Arnodb"/>
	<link rel="alternate" type="text/html" href="https://docs.ulyssis.org/Special:Contributions/Arnodb"/>
	<updated>2026-04-06T08:28:07Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.15</generator>
	<entry>
		<id>https://docs.ulyssis.org/index.php?title=Secure_file_permissions&amp;diff=1843</id>
		<title>Secure file permissions</title>
		<link rel="alternate" type="text/html" href="https://docs.ulyssis.org/index.php?title=Secure_file_permissions&amp;diff=1843"/>
		<updated>2024-06-11T07:13:32Z</updated>

		<summary type="html">&lt;p&gt;Arnodb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;PHP code is run with PHP-FPM as your ULYSSIS user. This means you can tighten up you website's security by denying other users the permission to read your PHP files. However, due to the way the Apache webserver works, it must be able to determine the existence of your PHP files. Non-PHP files in your www directory must remain readable by others, because Apache reads these as its own user.&lt;br /&gt;
&lt;br /&gt;
=== Recommended permissions ===&lt;br /&gt;
&lt;br /&gt;
* www directory (and other directories from where websites are served), including subdirectories: &amp;lt;code&amp;gt;0705/drwx---r-x&amp;lt;/code&amp;gt;&lt;br /&gt;
* Static website files (css, images, html, ...): &amp;lt;code&amp;gt;0604/-rw----r--&amp;lt;/code&amp;gt;&lt;br /&gt;
* Configuration files containing secrets/passwords: &amp;lt;code&amp;gt;0600/-rw-------&amp;lt;/code&amp;gt;&lt;br /&gt;
* Other directories and files that are not part of a website: &amp;lt;code&amp;gt;0600/-rw-------&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;0700/-rwx------&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Home directory security ===&lt;br /&gt;
&lt;br /&gt;
For the permissions mentioned above to fully work, it is important for the parent directories to have the correct permissions. Our system already gives your home directory the correct permissions for this. Other users cannot read your files, or even find out what files exist. Even in case you mistakingly give everyone every permission to one of your files, only you can access it, because others do not have permission to go into your home directory.&lt;br /&gt;
&lt;br /&gt;
{{notice|Important|If you have any secret files in your www directory, it may be publicly accessible via your website! Therefore, please make sure any files you want to protect are not in the www directory.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Securing database login info ===&lt;br /&gt;
&lt;br /&gt;
Suppose you have a file called &amp;lt;code&amp;gt;config.php&amp;lt;/code&amp;gt;, containing login information for your database. To secure this information, you can make it readable and writeable by only you, and nobody else using &amp;lt;code&amp;gt;chmod 600 config.php&amp;lt;/code&amp;gt;. In Cyberduck, you can do this by right-clicking on the config file, clicking on &amp;quot;Info&amp;quot;, clicking on the &amp;quot;Permissions&amp;quot; tab, and changing the permissions according to the following screenshots:&lt;br /&gt;
&lt;br /&gt;
[[File:Config-php-dropdown.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:Config-php-permissions.png]]&lt;br /&gt;
&lt;br /&gt;
=== Securing uploads directory ===&lt;br /&gt;
&lt;br /&gt;
Also, if there are directories that you made writeable by others, e.g. an uploads folder, this is no longer necessary. If this directory is called &amp;lt;code&amp;gt;uploads&amp;lt;/code&amp;gt;, you can remove write rights for others with &amp;lt;code&amp;gt;chmod go-w uploads&amp;lt;/code&amp;gt;. In Cyberduck, you can do this by right-clicking on the config file, clicking on &amp;quot;Info&amp;quot;, clicking on the &amp;quot;Permissions&amp;quot; tab, and changing the permissions according to the following screenshots:&lt;br /&gt;
&lt;br /&gt;
[[File:Uploads-dropdown.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:Uploads-permissions.png]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Files]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Security &amp;amp; anti-spam]]&lt;/div&gt;</summary>
		<author><name>Arnodb</name></author>
	</entry>
	<entry>
		<id>https://docs.ulyssis.org/index.php?title=Secure_file_permissions&amp;diff=1841</id>
		<title>Secure file permissions</title>
		<link rel="alternate" type="text/html" href="https://docs.ulyssis.org/index.php?title=Secure_file_permissions&amp;diff=1841"/>
		<updated>2024-06-09T09:12:16Z</updated>

		<summary type="html">&lt;p&gt;Arnodb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;PHP code is run with PHP-FPM as your ULYSSIS user. This means you can tighten up you website's security by denying other users the permission to read your PHP files. However, due to the way the Apache webserver works, it must be able to determine the existence of your PHP files. Non-PHP files in your www directory must remain readable by other users, because Apache reads these as its own user.&lt;br /&gt;
&lt;br /&gt;
=== Recommended permissions ===&lt;br /&gt;
&lt;br /&gt;
* www directory (and other directories from where websites are served), including subdirectories: &amp;lt;code&amp;gt;0705/drwx---r-x&amp;lt;/code&amp;gt;&lt;br /&gt;
* Static website files (css, images, html, ...): &amp;lt;code&amp;gt;0604/-rw----r--&amp;lt;/code&amp;gt;&lt;br /&gt;
* Configuration files containing secrets/passwords: &amp;lt;code&amp;gt;0600/-rw-------&amp;lt;/code&amp;gt;&lt;br /&gt;
* Other directories and files that are not part of a website: &amp;lt;code&amp;gt;0600/-rw-------&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;0700/-rwx------&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Home directory security ===&lt;br /&gt;
&lt;br /&gt;
For the permissions mentioned above to fully work, it is important for the parent directories to have the correct permissions. Our system already gives your home directory the correct permissions for this. Other users cannot read your files, or even find out what files exist. Even in case you mistakingly give everyone every permission to one of your files, only you can access it, because others do not have permission to go into your home directory.&lt;br /&gt;
&lt;br /&gt;
{{notice|Important| If you have any secret files in your www directory, it may be publicly accessible via your website! Therefore, please make sure any files you want to protect are not in the www directory. }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Securing database login info ===&lt;br /&gt;
&lt;br /&gt;
Suppose you have a file called &amp;lt;code&amp;gt;config.php&amp;lt;/code&amp;gt;, containing login information for your database. To secure this information, you can make it readable and writeable by only you, and nobody else using &amp;lt;code&amp;gt;chmod 600 config.php&amp;lt;/code&amp;gt;. In Cyberduck, you can do this by right-clicking on the config file, clicking on &amp;quot;Info&amp;quot;, clicking on the &amp;quot;Permissions&amp;quot; tab, and changing the permissions according to the following screenshots:&lt;br /&gt;
&lt;br /&gt;
[[File:Config-php-dropdown.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:Config-php-permissions.png]]&lt;br /&gt;
&lt;br /&gt;
=== Securing uploads directory ===&lt;br /&gt;
&lt;br /&gt;
Also, if there are directories that you made writeable by others, e.g. an uploads folder, this is no longer necessary. If this directory is called &amp;lt;code&amp;gt;uploads&amp;lt;/code&amp;gt;, you can remove write rights for others with &amp;lt;code&amp;gt;chmod go-w uploads&amp;lt;/code&amp;gt;. In Cyberduck, you can do this by right-clicking on the config file, clicking on &amp;quot;Info&amp;quot;, clicking on the &amp;quot;Permissions&amp;quot; tab, and changing the permissions according to the following screenshots:&lt;br /&gt;
&lt;br /&gt;
[[File:Uploads-dropdown.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:Uploads-permissions.png]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Files]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Security &amp;amp; anti-spam]]&lt;/div&gt;</summary>
		<author><name>Arnodb</name></author>
	</entry>
	<entry>
		<id>https://docs.ulyssis.org/index.php?title=Secure_file_permissions&amp;diff=1840</id>
		<title>Secure file permissions</title>
		<link rel="alternate" type="text/html" href="https://docs.ulyssis.org/index.php?title=Secure_file_permissions&amp;diff=1840"/>
		<updated>2024-06-09T09:10:55Z</updated>

		<summary type="html">&lt;p&gt;Arnodb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;PHP code is run with PHP-FPM as your ULYSSIS user. This means you can tighten up you website's security by denying other users the permission to read your PHP files. However, due to the way the Apache webserver works, it must be able to determine the existence of your PHP files. Non-PHP files in your www directory must remain readable by other users, because Apache reads these as it's own user.&lt;br /&gt;
&lt;br /&gt;
=== Recommended permissions ===&lt;br /&gt;
&lt;br /&gt;
* www directory (and other directories from where websites are served), including subdirectories: &amp;lt;code&amp;gt;0705/drwx---r-x&amp;lt;/code&amp;gt;&lt;br /&gt;
* Static website files (css, images, html, ...): &amp;lt;code&amp;gt;0604/-rw----r--&amp;lt;/code&amp;gt;&lt;br /&gt;
* Configuration files containing secrets/passwords: &amp;lt;code&amp;gt;0600/-rw-------&amp;lt;/code&amp;gt;&lt;br /&gt;
* Other directories and files that are not part of a website: &amp;lt;code&amp;gt;0600/-rw-------&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;0700/-rwx------&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Home directory security ===&lt;br /&gt;
&lt;br /&gt;
For the permissions mentioned above to fully work, it is important for the parent directories to have the correct permissions. Our system already gives your home directory the correct permissions for this. Other users cannot read your files, or even find out what files exist. Even in case you mistakingly give everyone every permission to one of your files, only you can access it, because others do not have permission to go into your home directory.&lt;br /&gt;
&lt;br /&gt;
{{notice|Important| If you have any secret files in your www directory, it may be publicly accessible via your website! Therefore, please make sure any files you want to protect are not in the www directory. }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Securing database login info ===&lt;br /&gt;
&lt;br /&gt;
Suppose you have a file called &amp;lt;code&amp;gt;config.php&amp;lt;/code&amp;gt;, containing login information for your database. To secure this information, you can make it readable and writeable by only you, and nobody else using &amp;lt;code&amp;gt;chmod 600 config.php&amp;lt;/code&amp;gt;. In Cyberduck, you can do this by right-clicking on the config file, clicking on &amp;quot;Info&amp;quot;, clicking on the &amp;quot;Permissions&amp;quot; tab, and changing the permissions according to the following screenshots:&lt;br /&gt;
&lt;br /&gt;
[[File:Config-php-dropdown.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:Config-php-permissions.png]]&lt;br /&gt;
&lt;br /&gt;
=== Securing uploads directory ===&lt;br /&gt;
&lt;br /&gt;
Also, if there are directories that you made writeable by others, e.g. an uploads folder, this is no longer necessary. If this directory is called &amp;lt;code&amp;gt;uploads&amp;lt;/code&amp;gt;, you can remove write rights for others with &amp;lt;code&amp;gt;chmod go-w uploads&amp;lt;/code&amp;gt;. In Cyberduck, you can do this by right-clicking on the config file, clicking on &amp;quot;Info&amp;quot;, clicking on the &amp;quot;Permissions&amp;quot; tab, and changing the permissions according to the following screenshots:&lt;br /&gt;
&lt;br /&gt;
[[File:Uploads-dropdown.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:Uploads-permissions.png]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Files]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Security &amp;amp; anti-spam]]&lt;/div&gt;</summary>
		<author><name>Arnodb</name></author>
	</entry>
	<entry>
		<id>https://docs.ulyssis.org/index.php?title=Secure_file_permissions&amp;diff=1839</id>
		<title>Secure file permissions</title>
		<link rel="alternate" type="text/html" href="https://docs.ulyssis.org/index.php?title=Secure_file_permissions&amp;diff=1839"/>
		<updated>2024-06-07T21:34:07Z</updated>

		<summary type="html">&lt;p&gt;Arnodb: /* Home directory security */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;PHP code is run with PHP-FPM as your ULYSSIS user. This means you can tighten up you website's security by denying other users the permission to read your PHP files. However, due to the way the Apache webserver works, it must be able to determine the existence of your PHP files. Non-PHP files in your www directory must remain readable by other users, because Apache reads these as it's own user.&lt;br /&gt;
&lt;br /&gt;
=== Recommended permissions ===&lt;br /&gt;
&lt;br /&gt;
* www directory (and other directories from where websites are served), including subdirectories: &amp;lt;code&amp;gt;0705/drwx---r-x&amp;lt;/code&amp;gt;&lt;br /&gt;
* Static website files (css, images, html, ...): &amp;lt;code&amp;gt;0604/-rw----r--&amp;lt;/code&amp;gt;&lt;br /&gt;
* Configuration files containing secrets/passwords: &amp;lt;code&amp;gt;0600/-rw-------&amp;lt;/code&amp;gt;&lt;br /&gt;
* Other directories and files that are not part of a website: &amp;lt;code&amp;gt;0600/-rw-------&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;0700/-rwx------&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Securing database login info ===&lt;br /&gt;
&lt;br /&gt;
Suppose you have a file called &amp;lt;code&amp;gt;config.php&amp;lt;/code&amp;gt;, containing login information for your database. To secure this information, you can make it readable and writeable by only you, and nobody else using &amp;lt;code&amp;gt;chmod 600 config.php&amp;lt;/code&amp;gt;. In Cyberduck, you can do this by right-clicking on the config file, clicking on &amp;quot;Info&amp;quot;, clicking on the &amp;quot;Permissions&amp;quot; tab, and changing the permissions according to the following screenshots:&lt;br /&gt;
&lt;br /&gt;
[[File:Config-php-dropdown.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:Config-php-permissions.png]]&lt;br /&gt;
&lt;br /&gt;
=== Securing uploads directory ===&lt;br /&gt;
&lt;br /&gt;
Also, if there are directories that you made writeable by others, e.g. an uploads folder, this is no longer necessary. If this directory is called &amp;lt;code&amp;gt;uploads&amp;lt;/code&amp;gt;, you can remove write rights for others with &amp;lt;code&amp;gt;chmod go-w uploads&amp;lt;/code&amp;gt;. In Cyberduck, you can do this by right-clicking on the config file, clicking on &amp;quot;Info&amp;quot;, clicking on the &amp;quot;Permissions&amp;quot; tab, and changing the permissions according to the following screenshots:&lt;br /&gt;
&lt;br /&gt;
[[File:Uploads-dropdown.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:Uploads-permissions.png]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Files]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Security &amp;amp; anti-spam]]&lt;br /&gt;
&lt;br /&gt;
=== Home directory security ===&lt;br /&gt;
&lt;br /&gt;
For the permissions mentioned above to fully work, it is important for the parent directories to have the correct permissions. Our system already gives your home directory the correct permissions for this. Other users cannot read your files, or even find out what files exist. Even in case you mistakingly give everyone every permission to one of your files, only you can access it, because others do not have permission to go into your home directory.&lt;br /&gt;
&lt;br /&gt;
{{notice|Important| If you have any secret files in your www directory, it may be publicly accessible via your website! Therefore, please make sure any files you want to protect are not in the www directory. }}&lt;/div&gt;</summary>
		<author><name>Arnodb</name></author>
	</entry>
	<entry>
		<id>https://docs.ulyssis.org/index.php?title=Secure_file_permissions&amp;diff=1838</id>
		<title>Secure file permissions</title>
		<link rel="alternate" type="text/html" href="https://docs.ulyssis.org/index.php?title=Secure_file_permissions&amp;diff=1838"/>
		<updated>2024-06-07T09:27:30Z</updated>

		<summary type="html">&lt;p&gt;Arnodb: /* Home directory security */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;PHP code is run with PHP-FPM as your ULYSSIS user. This means you can tighten up you website's security by denying other users the permission to read your PHP files. However, due to the way the Apache webserver works, it must be able to determine the existence of your PHP files. Non-PHP files in your www directory must remain readable by other users, because Apache reads these as it's own user.&lt;br /&gt;
&lt;br /&gt;
=== Recommended permissions ===&lt;br /&gt;
&lt;br /&gt;
* www directory (and other directories from where websites are served), including subdirectories: &amp;lt;code&amp;gt;0705/drwx---r-x&amp;lt;/code&amp;gt;&lt;br /&gt;
* Static website files (css, images, html, ...): &amp;lt;code&amp;gt;0604/-rw----r--&amp;lt;/code&amp;gt;&lt;br /&gt;
* Configuration files containing secrets/passwords: &amp;lt;code&amp;gt;0600/-rw-------&amp;lt;/code&amp;gt;&lt;br /&gt;
* Other directories and files that are not part of a website: &amp;lt;code&amp;gt;0600/-rw-------&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;0700/-rwx------&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Securing database login info ===&lt;br /&gt;
&lt;br /&gt;
Suppose you have a file called &amp;lt;code&amp;gt;config.php&amp;lt;/code&amp;gt;, containing login information for your database. To secure this information, you can make it readable and writeable by only you, and nobody else using &amp;lt;code&amp;gt;chmod 600 config.php&amp;lt;/code&amp;gt;. In Cyberduck, you can do this by right-clicking on the config file, clicking on &amp;quot;Info&amp;quot;, clicking on the &amp;quot;Permissions&amp;quot; tab, and changing the permissions according to the following screenshots:&lt;br /&gt;
&lt;br /&gt;
[[File:Config-php-dropdown.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:Config-php-permissions.png]]&lt;br /&gt;
&lt;br /&gt;
=== Securing uploads directory ===&lt;br /&gt;
&lt;br /&gt;
Also, if there are directories that you made writeable by others, e.g. an uploads folder, this is no longer necessary. If this directory is called &amp;lt;code&amp;gt;uploads&amp;lt;/code&amp;gt;, you can remove write rights for others with &amp;lt;code&amp;gt;chmod go-w uploads&amp;lt;/code&amp;gt;. In Cyberduck, you can do this by right-clicking on the config file, clicking on &amp;quot;Info&amp;quot;, clicking on the &amp;quot;Permissions&amp;quot; tab, and changing the permissions according to the following screenshots:&lt;br /&gt;
&lt;br /&gt;
[[File:Uploads-dropdown.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:Uploads-permissions.png]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Files]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Security &amp;amp; anti-spam]]&lt;br /&gt;
&lt;br /&gt;
=== Home directory security ===&lt;br /&gt;
&lt;br /&gt;
For the permissions mentioned above to fully work, it is important for the parent directories to have the correct permissions. Our system already gives your home directory the correct permissions for this. Other users cannot read your files, or even find out what files exist. Even in case you mistakingly give everyone every permission to one of your files, only you can access it, because others do not have permission to go into your home directory.&lt;br /&gt;
&lt;br /&gt;
{{notice|Important| If you any secret files into your www directory, it may be publicly accessible via your website! Therefore, please make sure any files you want to protect are not in the www directory. }}&lt;/div&gt;</summary>
		<author><name>Arnodb</name></author>
	</entry>
	<entry>
		<id>https://docs.ulyssis.org/index.php?title=Secure_file_permissions&amp;diff=1837</id>
		<title>Secure file permissions</title>
		<link rel="alternate" type="text/html" href="https://docs.ulyssis.org/index.php?title=Secure_file_permissions&amp;diff=1837"/>
		<updated>2024-06-07T09:26:24Z</updated>

		<summary type="html">&lt;p&gt;Arnodb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;PHP code is run with PHP-FPM as your ULYSSIS user. This means you can tighten up you website's security by denying other users the permission to read your PHP files. However, due to the way the Apache webserver works, it must be able to determine the existence of your PHP files. Non-PHP files in your www directory must remain readable by other users, because Apache reads these as it's own user.&lt;br /&gt;
&lt;br /&gt;
=== Recommended permissions ===&lt;br /&gt;
&lt;br /&gt;
* www directory (and other directories from where websites are served), including subdirectories: &amp;lt;code&amp;gt;0705/drwx---r-x&amp;lt;/code&amp;gt;&lt;br /&gt;
* Static website files (css, images, html, ...): &amp;lt;code&amp;gt;0604/-rw----r--&amp;lt;/code&amp;gt;&lt;br /&gt;
* Configuration files containing secrets/passwords: &amp;lt;code&amp;gt;0600/-rw-------&amp;lt;/code&amp;gt;&lt;br /&gt;
* Other directories and files that are not part of a website: &amp;lt;code&amp;gt;0600/-rw-------&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;0700/-rwx------&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Securing database login info ===&lt;br /&gt;
&lt;br /&gt;
Suppose you have a file called &amp;lt;code&amp;gt;config.php&amp;lt;/code&amp;gt;, containing login information for your database. To secure this information, you can make it readable and writeable by only you, and nobody else using &amp;lt;code&amp;gt;chmod 600 config.php&amp;lt;/code&amp;gt;. In Cyberduck, you can do this by right-clicking on the config file, clicking on &amp;quot;Info&amp;quot;, clicking on the &amp;quot;Permissions&amp;quot; tab, and changing the permissions according to the following screenshots:&lt;br /&gt;
&lt;br /&gt;
[[File:Config-php-dropdown.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:Config-php-permissions.png]]&lt;br /&gt;
&lt;br /&gt;
=== Securing uploads directory ===&lt;br /&gt;
&lt;br /&gt;
Also, if there are directories that you made writeable by others, e.g. an uploads folder, this is no longer necessary. If this directory is called &amp;lt;code&amp;gt;uploads&amp;lt;/code&amp;gt;, you can remove write rights for others with &amp;lt;code&amp;gt;chmod go-w uploads&amp;lt;/code&amp;gt;. In Cyberduck, you can do this by right-clicking on the config file, clicking on &amp;quot;Info&amp;quot;, clicking on the &amp;quot;Permissions&amp;quot; tab, and changing the permissions according to the following screenshots:&lt;br /&gt;
&lt;br /&gt;
[[File:Uploads-dropdown.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:Uploads-permissions.png]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Files]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Security &amp;amp; anti-spam]]&lt;br /&gt;
&lt;br /&gt;
=== Home directory security ===&lt;br /&gt;
&lt;br /&gt;
For the permissions mentioned above to fully work, it is important for the parent directories to have the correct permissions. Our system already gives your home directory the correct permissions for this. Other users cannot read your files, or even find out what files exist. Even in case you mistakingly give everyone every permission to a file, only you can access it, because others do not have permission to go into your home directory.&lt;br /&gt;
&lt;br /&gt;
{{notice|Important| If you any secret files into your www directory, it may be publicly accessible via your website! Therefore, please make sure any files you want to protect are not in the www directory. }}&lt;/div&gt;</summary>
		<author><name>Arnodb</name></author>
	</entry>
	<entry>
		<id>https://docs.ulyssis.org/index.php?title=Secure_file_permissions&amp;diff=1836</id>
		<title>Secure file permissions</title>
		<link rel="alternate" type="text/html" href="https://docs.ulyssis.org/index.php?title=Secure_file_permissions&amp;diff=1836"/>
		<updated>2024-06-06T22:13:07Z</updated>

		<summary type="html">&lt;p&gt;Arnodb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;PHP code is run with PHP-FPM as your ULYSSIS user. This means you can tighten up you website's security by denying other users the permission to read your PHP files. However, due to the way the Apache webserver works, it must be able to determine the existence of your PHP files. Non-PHP files in your www directory must remain readable by other users, because Apache reads these as it's own user.&lt;br /&gt;
&lt;br /&gt;
=== Recommended permissions ===&lt;br /&gt;
&lt;br /&gt;
* www directory (and other directories from where websites are served), including subdirectories: &amp;lt;code&amp;gt;0705/drwx---r-x&amp;lt;/code&amp;gt;&lt;br /&gt;
* Static website files (css, images, html, ...): &amp;lt;code&amp;gt;0604/-rw----r--&amp;lt;/code&amp;gt;&lt;br /&gt;
* Configuration files containing secrets/passwords: &amp;lt;code&amp;gt;0600/-rw-------&amp;lt;/code&amp;gt;&lt;br /&gt;
* Other directories and files that are not part of a website: &amp;lt;code&amp;gt;0600/-rw-------&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;0700/-rwx------&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Securing configuration files containing secrets/passwords ===&lt;br /&gt;
&lt;br /&gt;
If you have any files that you want to protect from the prying eyes of other users, such as API keys, first you need to ensure that the directory containing your important file, is not writeable by other users. This is easiest to do by creating a new directory, dedicated to housing your protected files. For this you can run &amp;lt;code&amp;gt;mkdir safe&amp;lt;/code&amp;gt;, followed by &amp;lt;code&amp;gt;chmod 700 safe&amp;lt;/code&amp;gt; and finally moving the file into the safe directory. Then you can make your file readable and writeable solely by you. To do this you run &amp;lt;code&amp;gt;chmod 600 safe/name_of_file&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
In Cyberduck, you can do this by making a new directory, right-clicking on it, clicking on &amp;quot;Info&amp;quot;, clicking on the &amp;quot;Permissions&amp;quot; tab, and changing the permissions so that for &amp;quot;Owner&amp;quot;, all the boxes (&amp;quot;Read&amp;quot;, &amp;quot;Write&amp;quot; and &amp;quot;Execute&amp;quot;) are ticked and for &amp;quot;Group&amp;quot; and &amp;quot;Other&amp;quot;, no boxes should be ticked. Next you can move the protected file into the safe directory. Once you go into the safe directory, you can then finish by right-clicking on the secret file, clicking on &amp;quot;Info&amp;quot;, clicking on the &amp;quot;Permissions&amp;quot; tab, and changing the permissions according to the following screenshots:&lt;br /&gt;
&lt;br /&gt;
[[File:Config-php-dropdown.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:Config-php-permissions.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Securing database login info ===&lt;br /&gt;
&lt;br /&gt;
Suppose you have a file called &amp;lt;code&amp;gt;config.php&amp;lt;/code&amp;gt;, containing login information for your database. To secure this information, you can make it readable and writeable by only you, and nobody else using &amp;lt;code&amp;gt;chmod 600 config.php&amp;lt;/code&amp;gt;. In Cyberduck, you can do this by right-clicking on the config file, clicking on &amp;quot;Info&amp;quot;, clicking on the &amp;quot;Permissions&amp;quot; tab, and changing the permissions according to the following screenshots:&lt;br /&gt;
&lt;br /&gt;
[[File:Config-php-dropdown.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:Config-php-permissions.png]]&lt;br /&gt;
&lt;br /&gt;
=== Securing uploads directory ===&lt;br /&gt;
&lt;br /&gt;
Also, if there are directories that you made writeable by others, e.g. an uploads folder, this is no longer necessary. If this directory is called &amp;lt;code&amp;gt;uploads&amp;lt;/code&amp;gt;, you can remove write rights for others with &amp;lt;code&amp;gt;chmod go-w uploads&amp;lt;/code&amp;gt;. In Cyberduck, you can do this by right-clicking on the config file, clicking on &amp;quot;Info&amp;quot;, clicking on the &amp;quot;Permissions&amp;quot; tab, and changing the permissions according to the following screenshots:&lt;br /&gt;
&lt;br /&gt;
[[File:Uploads-dropdown.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:Uploads-permissions.png]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Files]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Security &amp;amp; anti-spam]]&lt;/div&gt;</summary>
		<author><name>Arnodb</name></author>
	</entry>
	<entry>
		<id>https://docs.ulyssis.org/index.php?title=Getting_SSL/TLS&amp;diff=1705</id>
		<title>Getting SSL/TLS</title>
		<link rel="alternate" type="text/html" href="https://docs.ulyssis.org/index.php?title=Getting_SSL/TLS&amp;diff=1705"/>
		<updated>2022-04-09T21:43:50Z</updated>

		<summary type="html">&lt;p&gt;Arnodb: /* Generating certificates */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;ULYSSIS does not sell or offer any other SSL certificates than our self-signed certificate. We will however guide requests and install a certificate from the KU Leuven is you are eligible for one, and we will also install certificates you have bought or obtained elsewhere.&lt;br /&gt;
&lt;br /&gt;
==Requesting SSL from the KU Leuven==&lt;br /&gt;
&lt;br /&gt;
The KU Leuven partners with other universities through TERENA/Géant to arrange certificates for its services, organisations and academic structures. We have permission to request free SSL/TLS certificates for student unions (kringen) recognized by LOKO or faculty consultative bodies (facultaire overlegorganen) recognized by Studentenraad KU Leuven as well as organisations (vrije verenigingen) recognized by LOKO or KU Leuven. We are not eligible to request SSL/TLS certificates for individuals with a personal account, nor research groups or staff associations. We suggest those latter groups request certificates from KU Leuven ICTS directly or consider Let's Encrypt or another third party service.&lt;br /&gt;
&lt;br /&gt;
Before sending us a request, the following steps have to be performed:&lt;br /&gt;
* Set up the site that needs SSL if that's not already the case&lt;br /&gt;
* Make sure our nameservers are being used for the involved domain(s), as explained on [[Adding domain names]]&lt;br /&gt;
* Consider all subdomains (whether separate websites or not) you wish to have certificates for&lt;br /&gt;
* Make a list of all relevant arguments for your use of SSL/TLS certificates. It's important to consider aspects of your website where important or personal information is exchanged: registration, login pages, newsletter signup, etc.&lt;br /&gt;
&lt;br /&gt;
When '''all''' steps are done, the account holder of the ULYSSIS account can send an email to ulyssis@ulyssis.org containing their name, the name of the organisation, the relevant arguments what you will use SSL for and the domain and if needed a list of subdomains that should be covered by the certificate.&lt;br /&gt;
&lt;br /&gt;
Based on our previous experience and our arrangements with ICTS we will consider whether you are eligible for certificates and whether your request is well-founded. We will then generate the required cryptographic key and request and submit them on the certificate platform supplied by ICTS and its partners. Depending on the situation, the verification and delivery of the certificate can take some time. As soon as the certificate has been issued, we will install it and notify you.&lt;br /&gt;
&lt;br /&gt;
For procedures to request certificates, we follow instructions from ICTS. These instructions have changed several times in the past, so it's possible for a new request or for a renewal, you may have to follow a different procedure or make changes.&lt;br /&gt;
&lt;br /&gt;
{{notice|Limitations|ICTS does not allow SSL requests for historic *.student.kuleuven.be domains. We judge requests for username.ulyssis.be and username.studentenweb.org on an individual basis.}}&lt;br /&gt;
&lt;br /&gt;
==External certificates==&lt;br /&gt;
To install external certificates we require the certificate itself, the private key, and possibly the chain. We prefer you also send us (a link to) the documentation of your supplier. As certificate files, especially private keys, are a delicate matter we suggest you just email us the path in your homedirectory you've put them and we will move them over to the webserver safely. For more information concerning this procedure you can always contact us on ulyssis@ulyssis.org&lt;br /&gt;
&lt;br /&gt;
===Let's Encrypt===&lt;br /&gt;
We currently do not have an automated system for renewing and deploying certificates such as those supplied by Let's Encrypt. We are however looking into automating this process in the future. Since more of our users are starting to use Let's Encrypt, and all of their certificates need to be renewed frequently, we have a specific procedure now.&lt;br /&gt;
&lt;br /&gt;
When wishing to add a certificate with Let's Encrypt to your website, or renew your existing one, first create a folder &amp;lt;code&amp;gt;letsencrypt&amp;lt;/code&amp;gt; in your '''home directory'''. Then add a folder per domain or group of domains:&lt;br /&gt;
&lt;br /&gt;
 mkdir -p ~/letsencrypt/mydomain.be&lt;br /&gt;
&lt;br /&gt;
Certificates should be stored in these folders, according to the following file structure:&lt;br /&gt;
&lt;br /&gt;
 letsencrypt/&lt;br /&gt;
 └── mydomain.be/&lt;br /&gt;
     ├── mydomain.be.chain (the CA file)&lt;br /&gt;
     ├── mydomain.be.crt (the cert file; &amp;quot;public key&amp;quot;)&lt;br /&gt;
     └── mydomain.be.key (the key file; &amp;quot;private key&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
If you already possess the necessary files, renaming and copying them accordingly is sufficient. &lt;br /&gt;
'''You still have to email us to install your certificate.''' More information in the last section on this page.&lt;br /&gt;
&lt;br /&gt;
Otherwise, you can generate or renew your certificates using acme.sh. This is explained in the next section.&lt;br /&gt;
&lt;br /&gt;
==== Generating certificates ====&lt;br /&gt;
{{notice|If you use a &amp;lt;code&amp;gt;.htaccess&amp;lt;/code&amp;gt; file in the webroot of the domain name, make sure to add the following lines at the top of the file:|&amp;lt;pre&amp;gt;&amp;lt;IfModule mod_rewrite.c&amp;gt;&lt;br /&gt;
    RewriteRule &amp;quot;^.well-known/acme-challenge&amp;quot; - [L]&lt;br /&gt;
&amp;lt;/IfModule&amp;gt;&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
Because the normal method of generating Let's Encrypt certificates, certbot, requires root access, it's impossible for normal users to do so on our servers. Luckily there are plenty of alternatives which implement the Let's Encrypt protocol. In this tutorial, we'll show how to use the acme.sh program to generate certificates on the ULYSSIS servers. '''If you already followed this section to generate certificates, skip to the next section on renewing certificates.'''&lt;br /&gt;
&lt;br /&gt;
Firstly, execute the following commands to download the acme.sh script in your home directory and make it executable:&lt;br /&gt;
&lt;br /&gt;
 curl -o ~/acme.sh https://raw.githubusercontent.com/acmesh-official/acme.sh/master/acme.sh&lt;br /&gt;
 chmod +x ~/acme.sh&lt;br /&gt;
&lt;br /&gt;
Next, determine for which domains and subdomains you want to generate a certificate. You will need to generate a single certificate for each domain and subdomain which points to the same folder on your account (in most cases this is &amp;lt;code&amp;gt;www&amp;lt;/code&amp;gt; in your home directory).&lt;br /&gt;
&lt;br /&gt;
The following example command will generate a certificate for &amp;lt;code&amp;gt;mydomain.be&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;www.mydomain.be&amp;lt;/code&amp;gt; which points to the &amp;lt;code&amp;gt;www&amp;lt;/code&amp;gt; folder in the home directory. '''Change the parameters''' as explained below before executing this command!&lt;br /&gt;
&lt;br /&gt;
 ~/acme.sh --issue --cert-file ~/letsencrypt/mydomain.be/mydomain.be.crt --key-file ~/letsencrypt/mydomain.be/mydomain.be.key --ca-file ~/letsencrypt/mydomain.be/mydomain.be.chain -m &amp;quot;email@mydomain.be&amp;quot; -w ~/www -d mydomain.be -d www.mydomain.be --server letsencrypt&lt;br /&gt;
&lt;br /&gt;
The explanation of these many parameters is as follows:&lt;br /&gt;
* &amp;lt;code&amp;gt;--issue&amp;lt;/code&amp;gt; tells acme.sh to generate a new certificate.&lt;br /&gt;
* &amp;lt;code&amp;gt;--cert-file ~/letsencrypt/mydomain.be/mydomain.be.crt&amp;lt;/code&amp;gt; tells acme.sh to store the certificate file in the &amp;lt;code&amp;gt;letsencrypt/mydomain.be&amp;lt;/code&amp;gt; folder in your home directory, using the special file name as required by the file structure. '''This folder should already exist''', please refer to the previous section if you have not created this folder yet.&lt;br /&gt;
* &amp;lt;code&amp;gt;--key-file ~/letsencrypt/mydomain.be/mydomain.be.key&amp;lt;/code&amp;gt; tells acme.sh to store the key file in the &amp;lt;code&amp;gt;letsencrypt/mydomain.be&amp;lt;/code&amp;gt; folder in your home directory, using the special file name as required by the file structure.&lt;br /&gt;
* &amp;lt;code&amp;gt;--ca-file ~/letsencrypt/mydomain.be/mydomain.be.chain&amp;lt;/code&amp;gt; tells acme.sh to store the CA file in the &amp;lt;code&amp;gt;letsencrypt/mydomain.be&amp;lt;/code&amp;gt; folder in your home directory, using the special file name as required by the file structure.&lt;br /&gt;
* &amp;lt;code&amp;gt;-m &amp;quot;email@mydomain.be&amp;quot;&amp;lt;/code&amp;gt; tells acme.sh the email address associated with the certificate. Let's Encrypt will remind this email address (if provided) when the certificate is close to expiring.&lt;br /&gt;
* &amp;lt;code&amp;gt;-w ~/www&amp;lt;/code&amp;gt; tells acme.sh where the domains in this certificate point to. Make sure to change the &amp;lt;code&amp;gt;www&amp;lt;/code&amp;gt; part if the domains point to a different folder in your home directory.&lt;br /&gt;
* &amp;lt;code&amp;gt;-d mydomain.be&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-d www.mydomain.be&amp;lt;/code&amp;gt; tell acme.sh that the certificate should protect &amp;lt;code&amp;gt;mydomain.be&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;www.mydomain.be&amp;lt;/code&amp;gt;. The first domain name will be the &amp;quot;main domain&amp;quot;, which is important for renewing. You should '''add all domain names''' pointing to the &amp;lt;code&amp;gt;-w&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
* &amp;lt;code&amp;gt;--server letsencrypt&amp;lt;/code&amp;gt; tells acme.sh to use https://letsencrypt.org/ as Certificate Authority (CA).&lt;br /&gt;
&lt;br /&gt;
After executing this command with the right parameters, your certificate should be generated successfully. When you have to renew the certificate in the future, you should follow the instructions in the next section. '''Don't forget to email us to install your new certificate.''' More information in the last section on this page.&lt;br /&gt;
&lt;br /&gt;
==== Renewing certificates ====&lt;br /&gt;
To renew the certificates of &amp;lt;code&amp;gt;mydomain.be&amp;lt;/code&amp;gt;, just execute:&lt;br /&gt;
 ~/acme.sh --renew -d mydomain.be&lt;br /&gt;
&lt;br /&gt;
For the &amp;lt;code&amp;gt;-d&amp;lt;/code&amp;gt; parameter, you have to provide the '''first''' domain name you provided when generating the certificate (in the previous section, this was &amp;lt;code&amp;gt;mydomain.be&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If you are not sure which domain name to use, you can execute the command:&lt;br /&gt;
 ~/acme.sh --list&lt;br /&gt;
&lt;br /&gt;
This will generate a list of available certificates, which looks a bit like this:&lt;br /&gt;
 Main_Domain  KeyLength  SAN_Domains      CA               Created  Renew&lt;br /&gt;
 mydomain.be  &amp;quot;&amp;quot;         www.mydomain.be  LetsEncrypt.org  ...      ...&lt;br /&gt;
 ...          ...        ...              ...              ...      ...&lt;br /&gt;
&lt;br /&gt;
In this example, the main domain is &amp;lt;code&amp;gt;mydomain.be&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The renewed certificates will automatically be copied to the files you provided in the command to generate the certificates (see previous section).&lt;br /&gt;
&lt;br /&gt;
'''After renewing the certificate, you have to email us to install your certificate.''' More information in the next section.&lt;br /&gt;
&lt;br /&gt;
==== Getting your certificates installed ====&lt;br /&gt;
Check whether everything is stored correctly by executing the following command:&lt;br /&gt;
 ulyssis-certificate check mydomain.be&lt;br /&gt;
&lt;br /&gt;
If everything looks good, you should only see lines starting with &amp;lt;code&amp;gt;[ OK ]&amp;lt;/code&amp;gt;. Any line starting with &amp;lt;code&amp;gt;[FAIL]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[ABRT]&amp;lt;/code&amp;gt; means a check has failed, you must correct this error before asking us to install your certificate. &lt;br /&gt;
&lt;br /&gt;
Once all steps are done and if you are the '''account holder''', '''you can send us an email clearly stating the account name, for which domains we need to add certificates and where the files are stored'''. If you are renewing existing certificates, also clearly state that in your email.&lt;br /&gt;
&lt;br /&gt;
We have largely automated the installation of certificates. If you do not follow these instructions, your request will be denied or you may end up with broken SSL, so make sure you follow this procedure carefully.&lt;br /&gt;
&lt;br /&gt;
[[Category:Webserver]]&lt;/div&gt;</summary>
		<author><name>Arnodb</name></author>
	</entry>
</feed>