Correct CMOD settings for smarty3, subfolders and their users
Hi there @Friendica Support ,
this question is related to this help request:
frio theme - Service Unavailable
tupambae.org/display/0ac89072-…
I had a look at the smarty CHMOD settings and found the following:
drwxrwxr-x 3 www-data www-data 4096 Nov 8 20:23 smarty3
If I'm not wrong that's CMOD 775 (rwx|rwx|r-x) (?)
In the installation process the commands to create the smarty folders were:
www-data@VPShosting:~/html$ mkdir -p view/smarty3
www-data@VPShosting:~/html$ chmod 775 view/smarty3
see:
squeet.me/display/962c3e10-156…
tupambae.org/display/0ac89072-…
--
I looked into the subfolders and found:
rootname@VPShosting:/var/www/html/view/smarty3# ls -l
drwxr-xr-x 222 www-data www-data 4096 Nov 25 17:20 compiled => CMOD 755 (rwx|r-x|r-x) (?)
--
The folder "compiled" has a long list of sub-folders apparently each having 2 more steps of sub-folders.
rootname@VPShosting:/var/www/html/view/smarty3/compiled# ls -l
total 880
I found two types of folders, some few created on different dates strangely belonging to the user root instead of www-data, here two examples and how those two types of subfolders look like.
I guess the folders owned by root are wrong?
--------------------
drwxr-xr-x 3 root root 4096 Nov 12 04:35 00
-
rootname@VPShosting:/var/www/html/view/smarty3/compiled/00# ls -l
drwxr-xr-x 3 root root 4096 Nov 12 04:35 d4 => CMOD 755 (rwx|r-x|r-x) (?)
rootname@VPShosting:/var/www/html/view/smarty3/compiled/00/d4# ls -l
drwxr-xr-x 2 root root 4096 Nov 12 04:35 ec => CMOD 755 (rwx|r-x|r-x) (?)
rootname@VPShosting:/var/www/html/view/smarty3/compiled/00/d4/ec# ls -l
-rw-r--r-- 1 root root 675 Nov 12 04:35 00d4eca105abd94437094f3d4409477acb55526a_2.string.php => CMOD 644 (rw-|r--|r--) (?)
--------------------
drwxr-xr-x 3 www-data www-data 4096 Nov 22 20:25 01
-
rootname@VPShosting:/var/www/html/view/smarty3/compiled/01# ls -l
drwxr-xr-x 3 www-data www-data 4096 Nov 22 20:25 97 => CMOD 755 (rwx|r-x|r-x) (?)
rootname@VPShosting:/var/www/html/view/smarty3/compiled/01/97# ls -l
drwxr-xr-x 2 www-data www-data 4096 Nov 22 20:25 f2 => CMOD 755 (rwx|r-x|r-x) (?)
rootname@VPShosting:/var/www/html/view/smarty3/compiled/01/97/f2# ls -l
-rw-r--r-- 1 www-data www-data 6140 Nov 22 20:25 0197f2d4b23957a898d38870d6c6a3775da487ff_2.file.group_side.tpl.php => CMOD 644 (rw-|r--|r--) (?)
utopiArte
in reply to TupambAdminOrg [2026.01] • • •Just checked all the 13 of 220 folders that were created as belonging to user and group
rootand that I consider shouldn't exist as owned by root i the folder /smarty3.In general terms speaking I couldn't find a common property.
They refer to posts or replies by three different users.
Most refer to one specific post.
Two create a page:
Not Found
The requested item doesn't exist or has been deleted.
Request: XYZ
All were created with the theme VIER.
utopiArte
in reply to TupambAdminOrg [2026.01] • • •New error message (of FRIO) about a folder created by the user root.
I haven't found the extensive conversation about this problem with @Hypolite Petovan yet but I'm quite sure that I changed all folders to ownership of user www-data before 28th of November of the smarty folder. Actually there was another conversation about ownership of folders and I changed all folders to be owned by root except storage and view that day on 02:45hs, the new folder owned by root at /view/smarty3/compiled/ like stated below was created on 3:50hs.
As for what I remember of all the conversations this shouldn't have happened.
Service Unavailable
Exception thrown in /var/www/html/src/Core/Renderer.php:90unable to create directory /var/www/html/view/smarty3/compiled/7c/ea/e6
Stack trace:
#0 /var/www/html/mod/photos.php(902): Friendica\Core\Renderer::replaceMacros()
#1 /var/www/html/src/LegacyModule.php(96): photos_content()
#2 /var/www/html/src/LegacyModule.php(73): Friendica\LegacyModule->runModuleFunction()
#3 /var/www/html/src/BaseModule.php(244): Friendica\LegacyModule->content()
#4 /var/www/html/src/App.php(703): Friendica\BaseModule->run()
#5 /var/www/html/index.php(52): Friendica\App->runFrontend()
#6 {main}
Console research result
rootname@VPShosting:/var/www/html/view/smarty3/compiled# ls -l..
drwxr-xr-x 5 www-data www-data 4096 Dec 6 00:40 7b
drwxr-xr-x 3 root root 4096 Nov 28 03:50 7c
drwxr-xr-x 3 www-data www-data 4096 Nov 28 02:45 7d
..
-----------------
rootname@VPShosting:/var/www/html/view/smarty3/compiled# cd 7c
rootname@VPShosting:/var/www/html/view/smarty3/compiled/7c# ls -l
total 4
drwxr-xr-x 3 root root 4096 Nov 28 03:50 d2
rootname@VPShosting:/var/www/html/view/smarty3/compiled/7c# cd d2
rootname@VPShosting:/var/www/html/view/smarty3/compiled/7c/d2# ls -l
total 4
drwxr-xr-x 2 root root 4096 Nov 28 03:50 69
rootname@VPShosting:/var/www/html/view/smarty3/compiled/7c/d2# cd 69
rootname@VPShosting:/var/www/html/view/smarty3/compiled/7c/d2/69# ls -l
total 4
-rw-r--r-- 1 root root 710 Nov 28 03:50 7cd2693513597460a71347ba02d3179c5e5ab822_2.string.php
nano 7cd2693513597460a71347ba02d3179c5e5ab822_2.string.php
Hypolite Petovan
in reply to utopiArte • • •root? It should run aswww-data. Same question if you're using the daemon.utopiArte
in reply to Hypolite Petovan • • •Not using daemon but CRON.
I guess that is running as root ..
utopiArte
in reply to utopiArte • • •@Hypolite Petovan
So this is a "tricky" one for me as I have no idea what or how to do this.
In the helpers page:
tupambae.org/help/Install#cron…
it only states:
helpers page wrote:
I did my installation with the help of @hankg's tutorial:
nequalsonelifestyle.com/2022/0…
ubuntu install tutorial wrote:
How do I set this so "It should run as www-data."
??
Hypolite Petovan
in reply to utopiArte • • •phpcommand withsu -u friendicaand the command will be ran as www-data.utopiArte
in reply to Hypolite Petovan • • •Something like this?
# For more information see the manual pages of crontab(5) and cron(8)
#
# m h dom mon dow command
*/5 * * * * cd /var/www/html; su -u friendica /usr/bin/php bin/worker.phpHypolite Petovan
in reply to utopiArte • • •utopiArte
in reply to Hypolite Petovan • • •As off now it was running like this:
*/5 * * * * cd /var/www/html; /usr/bin/php bin/worker.phpYour suggestion:
phpcommand withsu -u friendica*/5 * * * * cd /var/www/html;su -u friendica/usr/bin/php bin/worker.phpWhat we didn't actually clarified is what
friendicastands for.Like to say, is it a "place holder", a variable for a user or application name?
Is "friendica" defined as such in
worker.php?Or would it actually be
www-data?Hypolite Petovan
in reply to utopiArte • • •friendicais the name of my local node web server user. You should be writingwww-datainstead.Nanook