Can't create a file in /etc/asterisk with user asterisk

Hi everyone.

I had installed asterisk 17 and create an user called “asterisk”. I changed the owner of the directory for the user “asterisk”, but still cant create a single file into the directory.

I used those commands:
sudo chown asterisk:asterisk /etc/asterisk/; sudo chmod 664 /etc/asterisk/
sudo -u asterisk vim /etc/asterisk/asterisk.conf

but doesnt work.

somebody can help me?
I am using CentOS 8 for this project.

What doesn’t work? What happens?

It could be any number of things – but my first inclination would be SELinux. What’s the output of running “sestatus”?

If it does turn out to be an SELinux issue, I don’t recommend turning off SELinux completely, but instead labeling the files correctly.

Also, which user owns the /etc/asterisk directory?

Thanks for helping.

I dont had permission to create the file. After some days trying, i change the permissions of directory for 774. That way i could create the file.

Thanks for helping.

Turned out, it was about permissions of the directory asterisk. After change it, it works.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.