Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1248
  • Last Modified:

No permission to run php file on /dev/ ttyACM0 device

Hi All,

I am having difficulties executing php file through apache on to /dev/ ttyACM0 device, example (http//localhost/myphp.php).

The file suppose to send text message through /dev/ttyACM0. But i get permission denied.  Through Terminal I can execute php using (php myphp.php), it will run without problem.

I gave chmod 777 to /dev/ ttyACM0. And chown apache user on /dev/ ttyACM0, but still permission denied.

It seems to me permission restricted on apache to run /dev/ ttyACM0.

How can i solve this ?

thanks
0
rawandnet
Asked:
rawandnet
  • 2
2 Solutions
 
dsmileCommented:
Pls attach your httpd.conf here so we can all take a look
0
 
ZadoCommented:
Try to give chmod 777 to your root folder and apply it to all subfolders/files (usually you have this option in ftp clients)
0
 
rawandnetAuthor Commented:
Sorry for the delay replay

dsmile: Httpd.conf file has default setting, do I need to make any changes under httpd.conf file, see below for httpd configuration. I am getting to a point to run httpd as root user, which isn’t secure.

Zado: there is one configuration file and that is conlaed /etc/gnokiirc, I have give chmod 777 on that file still nothing. And I don’t have ftp on my server.

httpd.conf
(((((((((((((
ServerRoot "/etc/httpd"

PidFile run/httpd.pid

#Listen 12.34.56.78:80
Listen 80

Include conf.d/*.conf

endedStatus On

User apache
Group apache

ServerAdmin root@localhost

UseCanonicalName Off

DocumentRoot "/var/www/html"

<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>

<Directory "/var/www/html">
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

<IfModule mod_userdir.c>
    UserDir disable
</IfModule>

DirectoryIndex index.html index.html.var
AccessFileName .htaccess

<Files ~ "^\.ht">
    Order allow,deny
    Deny from all
</Files>

TypesConfig /etc/mime.types

DefaultType text/plain

<IfModule mod_mime_magic.c>
#   MIMEMagicFile /usr/share/magic.mime
    MIMEMagicFile conf/magic
</IfModule>

HostnameLookups Off

ErrorLog logs/error_log

tomLog logs/access_log combined


ServerSignature On

Alias /icons/ "/var/www/icons/"

<Directory "/var/www/icons">
    Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

<IfModule mod_dav_fs.c>
    # Location of the WebDAV lock database.
    DAVLockDB /var/lib/dav/lockdb
</IfModule>

ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"


<Directory "/var/www/cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>

IndexOptions FancyIndexing VersionSort NameWidth=* HTMLTable

DefaultIcon /icons/unknown.gif

ReadmeName README.html
HeaderName HEADER.html

IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t

AddDefaultCharset UTF-8

AddType text/html .shtml
AddOutputFilter INCLUDES .shtml

Alias /error/ "/var/www/error/"

<IfModule mod_negotiation.c>
<IfModule mod_include.c>
    <Directory "/var/www/error">
        AllowOverride None
        Options IncludesNoExec
        AddOutputFilter Includes html
        AddHandler type-map var
        Order allow,deny
        Allow from all
        LanguagePriority en es de fr
        ForceLanguagePriority Prefer Fallback
    </Directory>
</IfModule>
</IfModule>

)))))))




0
 
rawandnetAuthor Commented:
thanks guys i fixed it, it was to do with program i installed. not apache.
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now