Flarum folder ownership
This should probably be split into a new discussion as I don't think it has anything to do with this extensions.
ash3T split from the GIFs extension discussion.
- Edited
Thanks for moderating in the forum. Actually, I was hoping to get some help to see what the issues are?
The user photo is not showing up after uploading the photo, the same with the website logo and favcoin. All can be seen in the admin page(admin photo and website logo), but not in other pages. Even in the flarum installed in my own computer.
ctml Thanks for your help. I only can access the folders under htdocs. So I won't be able to do the following.
ctml /home/vol19_1/freehost4u.org/trfr1_28952748
Maybe I can do something to deal with this issue first in installed flarum on my computer. As I mentioned, the following doesn't make any difference.
ash3T $ chmod 775 /Applications/MAMP/htdocs/flarum
$chmod 775 -R /Applications/MAMP/htdocs/flarum
Thanks for your attention.
- Edited
ash3T where did you get /Applications from?
Do an ls -l
in from shell when you first login and execute the command based on directories you see from the output. Do not start with a / because that refers to an absolute path, which I guess you do not have access to since you are on shared hosting.
E.g.
$ ls -l
dir1
dir2
dir3
$ chmod -R 775 dir2
- Edited
ctml Thanks!
Yes, my remote server is on shared hosting.
I did
ctml ls -l in from shell
on my computer
I think I need to change the following directory
drwxr-xr-x 83 User staff 2656 Jul 1 20:43 vendor
right?
I did
$ chmod 775 -r vendor
chmod: -r: No such file or directory
I don't think it should be the expected result, right?
Still cannot see the previews on the Media manager
By the way, I check the folder, /assets/files/2021-07-10/1625925228-789126-92670765.jpg , the photo is right there, it just cannot preview or upload properly.
[upl-image-preview url=http://localhost:8000/assets/files/2021-07-10/1625925228-789126-92670765.jpg]
- Edited
ash3T recursive option is a capital -R. The vendor folder is going to contain most of the flarum and extensions code, it won't include your public assets folder which is where uploads and things like that are going to be stored. So if you still have issues after that you will probably want to do the same on your public directories.
What do you mean on your computer? Are you doing this locally and uploading files or running directly on your web host?
Yes you definitely have issues with permissions, I saw user avatars were not displaying properly much like the gifs.
Thanks for your continue help.
Yes, I doing this locally first, then uploading files on the server. I was able to upload images locally. But now I cannot, not sure why.
The only public file I find after run the
ctml $ ls -l
command.
drwxrwxr-x+ 5 User staff 160 Jul 16 2015 Public
I don't think it will be the right one. I did
$ chmod -R 775 Public
anyway.
Not luck of change anything.
Then I did the same to the following folder.
drwxr-xr-x 17 Username staff 544 Jul 4 10:06 flarum
lrwxr-xr-x 1 Username staff 44 Jul 2 08:44 php -> /Applications/MAMP/bin/php/php7.4.12/bin/php
Nothing changes.
ash3T how are you uploading to your host, SFTP? If yes read man pages, you can pass options to set or preserve permissions during upload.
https://linux.die.net/man/1/sftp
Tbh I'm not sure when you are showing permissions where that output is from, your PC or your host. Are you running Linux or macOS on your computer?
Does your shared host provide cpanel? You should be able to change directly in there too.
https://www.inmotionhosting.com/support/edu/cpanel/change-file-permissions/
- Edited
Thanks ctml. Thanks for sending me links for SFTP.
I reinstalled flarum again on my computer. And there is no issue with updating and showing user photo and website logo. Then as I open more extension. Now the photo is not showing again. I zipped the flarum file and export Mysql database along the way. However, the bio photo just won't show up anymore. It was on my own computer. I really need some help here.
Update:Just to make a note. It is not because of the folder ownership, after I turned off the extension "FoF Secure HTTPS", all images appear again. And the upload user bio photo functions well.
Anyway, thanks everyone in the community to offer your help and support!!