I recently made a site with Kirby and I’ve been trying to deploy it on NearlyFreeSpeech with Cyberduck, but I’m not actually sure how?
I’ve already uploaded all the files through SFTP, and the index page works fine BUT when I try to click a link from the index to another page, there’s a 404 error. From what I can tell, this is because of how content pages are kept in their own Content folder in Kirby, so I’m not sure what I’m supposed to do now.
If anyone else have experience using nearlyfreespeech, how did you do it? This is the first time I’ve tried to deploy anything, let alone a CMS, so this is all new to me
On second thought, can you also go over how to enable rewriting for the panel for the panel installation? Specifically
/site/accounts,
thumbs folder
content folder and all contained files and folders
/assets/avatars.
In the NFS FAQ, it says:
In order for a PHP or CGI script, or a daemon processes run as the “web” user, to write to a file, the “web” user must have write access to that file. There are two ways to accomplish this.
Set the file to be owned by the web group and set the permissions to allow group-writes. (E.g. chgrp web example.file and either chmod g+w example.file or chmod 664 example.file from the command line.)
Set the file to allow any writes. (E.g. either chmod a+w example.file or chmod 666 example.file from the command line.)
In order for a script or web process to create a file, it’s the permissions of the directory in which the file is to be created that matter. To allow this, do either of the following:
Set the parent directory to be owned by the web group and allow group writes. (E.g. to create /parent/dir/example.file, first chgrp web /parent/dir and then either chmod g+w /parent/dir or chmod 775 /parent/dir from the command line.)
Set the parent directory to allow any writes. (E.g. to create /parent/dir/example.file, do either chmod a+w /parent/dir or chmod 777 /parent/dir from the command line.)
I’ve installed Cyberduck’s command line interface, but am at a loss as to how to connect it and actually use it.
$ chmod -v 755 site/accounts
$ chmod -v 755 thumbs
$ chmod -R 755 content
$ chmod -v 755 assets/avatars
chmod: assets/avatars: No such file or directory
But it doesn’t seem like anything happened. It’s back to the screen with the error message:
Also, what does the assets/avatars folder do exactly? I deleted it earlier on since I wasn’t using it and the index.html that was there in the default Kirby template was empty. Should I remake it?
Recreated the avatar folder. Should the chown command be structured like the ones for chmod? If so, I keep getting chown: filename: Operation not permitted errors
Check the user:group of the public folder too, since this effects anything inside it. No amount of changing permissions and ownership of the contents of that folder will help because with Linux you need owner and rights to the full path.
The current owner of the public folder is drwxr-xr-x 8 261686 261686 12 Mar 11 18:05 public
Ownership of the contents of the public folder is
[/home/public]$ ls -la
total 40
drwxr-xr-x 8 261686 261686 12 Mar 11 18:05 .
drwxr-xr-x 8 root 261686 8 Feb 21 03:27 ..
-rwxr-xr-x 1 261686 261686 1433 Mar 11 18:05 .htaccess
drwxr-xr-x 7 261686 261686 8 Mar 14 20:59 assets
drwxr-xr-x 6 261686 261686 7 Mar 8 06:18 content
-rwxr-xr-x 1 261686 261686 292 Mar 8 06:18 index.php
drwxr-xr-x 10 261686 261686 22 Mar 8 06:18 kirby
-rwxr-xr-x 1 261686 261686 6261 Mar 8 06:18 license.md
drwxr-xr-x 4 261686 261686 8 Mar 8 06:18 panel
-rwxr-xr-x 1 261686 261686 2049 Mar 8 06:18 readme.md
drwxr-xr-x 13 261686 261686 13 Mar 8 06:18 site
drwxr-xr-x 4 261686 261686 5 Mar 8 06:18 thumbs
I’ve been trying chown -cR www:261686 public and the other folders as well, but it still gets Operation not permitted errors.
When I try to use the sudo command from either home or home/public,
[/home/public]$ sudo chown -cR www:data /content
-bash: sudo: command not found