Good day!
I want to create an app. App implement setting for 1C:Enterprise server. For this purpose i need to read file from /var/www/html/my_folder/default.vrd but i catch an exception. File not found.
i can read file from this place /etc/httpd/conf.d/server_1c.conf, but i cant read file from /var/www/html/my_folder/default.vrd. Why? permissions for the default.vrd is 755. Permissions for the my_folder is 755.
I want to create an app. App implement setting for 1C:Enterprise server. For this purpose i need to read file from /var/www/html/my_folder/default.vrd but i catch an exception. File not found.
i can read file from this place /etc/httpd/conf.d/server_1c.conf, but i cant read file from /var/www/html/my_folder/default.vrd. Why? permissions for the default.vrd is 755. Permissions for the my_folder is 755.
Share this post:
Responses (9)
-
Accepted Answer
Nick Howitt wrote:
They both have read permissions for Other. This suggests the problem is elsewhere. Do you get an option to open the file in read-only mode? I don't think Ill be able to help much further as I am not really a programmer.
Can you help me with other question?
I want to execute command from php.
shell = new Shell() and etc in last a try to execute this command: /usr/bin/sudo /opt/1C/v8.3/x86_64/webinst -apache24 -wsdir msweb_2025 -dir /var/www/html/msweb_2025 -connstr "Srvr=192.168.1.100;Ref=msweb2025;" -confPath /etc/httpd/conf.d/server_1c.conf 2>&1
And i have an error: retval = 1 /* Operation not permitted */
But if i execute this command from terminal under the root user all work perfect. I know that apache user have less privileges. But for this purpose we use /use/bin/sudo, isnt it? -
Accepted Answer
Nick Howitt wrote:
They both have read permissions for Other. This suggests the problem is elsewhere. Do you get an option to open the file in read-only mode? I don't think Ill be able to help much further as I am not really a programmer.
It works now. I dont know why. I restart apache and some other services. -
Accepted Answer
-
Accepted Answer
Nick Howitt wrote:
No. ClearOS is pretty permissive. Which user are you trying to access the folder as? What is the output of:getent group | grep allusers
allusers:*:63000:ivan,uralsk,slava,flexshare,winadmin,guest,email-archive
But i can access to the /etc/httpd/conf.d/server_1c.conf via php. It works fine. I can read this file from php. This is permissions for that file
[root@office conf.d]# ls -l
total 60
-rw-rw-rw- 1 root root 620 Jun 19 13:37 server_1c.conf
owner and group = root, but does not matter. -
Accepted Answer
-
Accepted Answer
Nick Howitt wrote:
Who owns the files and folders in /var/www/html? It should be apache:allusers or perhaps, any_user:allusers.
That's just the point, that it is
ls -l for /var/www/html/my_folder/
-rw-r--r-- 1 apache allusers 391 Jun 19 23:30 default.vrd
[root@office html]# pwd
/var/www/html
[root@office html]# ls -l
total 32
drwxr-xr-x 2 apache allusers 24 Jun 19 23:30 my_folder
[root@office www]# pwd
/var/www
[root@office www]# ls -l
total 0
drwxr-xr-x 2 root root 6 Oct 20 2017 cgi-bin
drwxrwxr-- 3 apache allusers 50 Jun 3 10:48 html
drwxr-xr-x 2 root root 6 Feb 21 06:41 virtual -
Accepted Answer
Please login to post a reply
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here.
Register Here »