Why am I getting a Permission Denied Here?

If the user didn’t exist, sudo would complain and ls -l would show numbers (uid/gid) instead of names.

Asterisk 16 is no longer supported.

Asterisk-16.30.0 is out of support (getting security fixes only) and will be
completely End of Life in under 6 months’ time.

https://wiki.asterisk.org/wiki/display/AST/Asterisk+Versions

Antony.

same Permission Denied on the following too:

http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-20-current.tar.gz

My guess is that you are still creating a user called astmin and setting file
ownerships to asterisk (or perhaps vice versa).

Please follow the advice of EkFudrek: “Start from scratch and replace every
‘astmin’ with ‘asterisk’”.

Basically, do not create a user called astmin, and do not tell the installer
script to use this name. Use “asterisk” as the name of the user and the name
of the group throughout and you should end up with a pretty standard
installation.

Antony.

How come
$ sudo chown asterisk:asterisk /etc/asterisk ; sudo chmod 777 /etc/asterisk
makes it working?
What’s the Difference between 664 and a 777?

How come
$ sudo chown asterisk:asterisk /etc/asterisk ; sudo chmod 777 /etc/asterisk
makes it working?

Because permissions=777 effectively means “no security; any user can do
anything with these files”

You are strongly advised not to do this - it is a workaround to a problem, it
is not a solution, and it does not fix the background problem which may well
have further consequences if you do not get rid of this “astmin” user.

What’s the Difference between 664 and a 777?

Simple:

664 means “owner and group can read and write; anyone else can read”.

777 means “anyone at all can read / write / delete / enter directories / do
anything”.

It is NOT something you should ever do to fix a problem; it means you have not
understood what the problem is, or what other difficulties it may create.

Antony.

1 Like

But the author has exclusively mentioned this username to be created, also assigned some tasks to be done by the same user. How can I omit these steps in between?

Is the author wrong?

chmod 764 would suffice?

As pointed out, you should not set the last digit to 7 unless you really know what you are doing. There are very rare cases where this is appropriate, the /tmp directory being the most obvious one. Even then the there is an extra bit set, so the full mode for /tmp is 1777

However the difference that is relevant here is that the 1 bit is needed on a directory for any class of user that is going to use it as directory. With 4, but not 1, you can list the names of the files and sub-directories, but cannot access their contents. The bits, in the last three positions, are 4=read, 2=write, 1=execute for a file, or use as directory for a directory.

I cannot say that this author is “wrong” without reading the (relevant section
of the) book, but I can say that any asterisk system I have come across which
is installed from packages (ie: what I would call a “standard” way of setting
it up) uses the “asterisk” user and group, and that is essentially what people
here are going to be expecting if you come back with further questions once
you get in to configuring Asterisk and its dialplans.

Nobody has said you should omit any steps.

The advice from EkFudrek was “Start from scratch and replace every ‘astmin’
with ‘asterisk’”.

In other words, follow the instructions you have, but wherever they say
“astmin” use the name “asterisk” instead.

Antony.

To create a sensible value, the last digit would have to be 5 or 0, and the middle digit 5 or 7. Which is appropriate depends on exactly how they are used, although it is very unlikely that you need more than 0 in the last position.

You may find it easier to use the symbolic mode of chmod,

david@dhcppc4:~$ chmod 000 fred
david@dhcppc4:~$ ls -l fred
---------- 1 david david 0 Apr 21 13:09 fred
david@dhcppc4:~$ chmod ug=rwx,o=rx fred
david@dhcppc4:~$ ls -l fred
-rwxrwxr-x 1 david david 0 Apr 21 13:09 fred
david@dhcppc4:~$ chmod ug=rwx,o-rx fred
david@dhcppc4:~$ ls -l fred
-rwxrwx--- 1 david david 0 Apr 21 13:09 fred
david@dhcppc4:~$

You asked “chmod 764 would suffice?”

  1. We don’t know - try it and see - it’s your system, although as David551 has
    pinted out, it’s an unlikely value to be helpful or appropriate.

  2. This still looks to me like a workaround instead of solving the actual
    problem. I have already said that not actually solving the underlying problem
    with this astmin user may cause you further difficulties in the future, and we
    have no idea what they may be at this point.

  3. We have already advised you what we think is the correct solution to your
    problem; if you don’t wish to do that then we can only wish you good luck with
    resolving it some other way.

  4. If our advice doesn’t work in combination with the instructions you are
    following, then I would suggest you search the Internet for another set of
    instructions (I can find plenty for installing Asterisk under CentOS 7 - most
    of them seem to be for Asterisk 16, but I would expect the same instructoins
    to work for Asterisk 20) and try those instead.

Antony.

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