Forums

×

Warning

JUser: :_load: Unable to load user with ID: 194441
Medium
Offline
Resolved
0 votes
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.
Tuesday, June 19 2018, 06:07 PM
Share this post:
Responses (9)
  • Accepted Answer

    Thursday, June 21 2018, 02:22 AM - #Permalink
    Resolved
    0 votes
    the mater in the /etc/sudouser file. There is now rule for my command in this file.
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, June 20 2018, 09:06 PM - #Permalink
    Resolved
    0 votes
    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?
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, June 19 2018, 08:20 PM - #Permalink
    Resolved
    0 votes
    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.
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, June 19 2018, 08:18 PM - #Permalink
    Resolved
    0 votes
    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.
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, June 19 2018, 07:59 PM - #Permalink
    Resolved
    0 votes
    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.
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, June 19 2018, 07:34 PM - #Permalink
    Resolved
    0 votes
    No. ClearOS is pretty permissive. Which user are you trying to access the folder as? What is the output of:
    getent group | grep allusers
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, June 19 2018, 07:27 PM - #Permalink
    Resolved
    0 votes
    Nick Howitt wrote:

    Who owns the files and folders in /var/www/html? It should be apache:allusers or perhaps, any_user:allusers.


    SELinux is disabled. May be there is something like selinux?
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, June 19 2018, 06:48 PM - #Permalink
    Resolved
    0 votes
    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
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, June 19 2018, 06:41 PM - #Permalink
    Resolved
    0 votes
    Who owns the files and folders in /var/www/html? It should be apache:allusers or perhaps, any_user:allusers.
    The reply is currently minimized Show
Your Reply