Dear,
Viewers, I am facing issue with CentOS file permission, I have some .conf file in /root/sys directory & when I am trying to open those files or write into those files I am getting a permission error
failed to open stream: Permission denied, but if I keep those file in other directories its working fine.
I need help how to give permission to root directory, Thanks for your kind attention, wait for your reply.
Root Directory Permission Error
Re: Root Directory Permission Error
What is trying to use the files ? Files in /root should only be readable by the root user, no-one else.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Re: Root Directory Permission Error
You mean to say I can't give permission to write the file by WebServer? those files are asterisk config files its customized asteriskTrevorH wrote:What is trying to use the files? Files in /root should only be readable by the root user, no-one else.
Re: Root Directory Permission Error
Pick a different location to keep your file. That directory belongs to the root user and should not have any permissions for anyone else in the system, most especially not something as easily hackable as a web server.
Configuration files that belong to asterisk should reside in /etc/asterisk. It should have read permission on those files and ideally it should not have write access... at least I've been running about 50 asterisk systems for the last 6 years and none of those have write acccess to anything in /etc/asterisk. Files that it needs to write should be in /var/lib/asterisk or /var/run/asterisk or their subdirectories.
Configuration files that belong to asterisk should reside in /etc/asterisk. It should have read permission on those files and ideally it should not have write access... at least I've been running about 50 asterisk systems for the last 6 years and none of those have write acccess to anything in /etc/asterisk. Files that it needs to write should be in /var/lib/asterisk or /var/run/asterisk or their subdirectories.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Re: Root Directory Permission Error
TrevorH wrote:Pick a different location to keep your file. That directory belongs to the root user and should not have any permissions for anyone else in the system, most especially not something as easily hackable as a web server.
Configuration files that belong to asterisk should reside in /etc/asterisk. It should have read permission on those files and ideally it should not have write access... at least I've been running about 50 asterisk systems for the last 6 years and none of those have write acccess to anything in /etc/asterisk. Files that it needs to write should be in /var/lib/asterisk or /var/run/asterisk or their subdirectories.
I know sir but this our developer make customized Asterisk which can run only from root directory, if I changed the directory it won't work anymore, please help me if there is any possibility to give permission read/write of root dir
Re: Root Directory Permission Error
Tell your developer not to be stupid. Asterisk hasn't needed to run as root for years and for security, it should not do so.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke