ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Permissions in Linux - Asterisk

    IT Discussion
    5
    19
    2.2k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • scottalanmillerS
      scottalanmiller
      last edited by

      Fred needs to be added to the group owner of those files, don't change the actual owner, that will just cause reliability issues.

      1 Reply Last reply Reply Quote 2
      • stacksofplatesS
        stacksofplates
        last edited by stacksofplates

        Additionally if the files being uploaded are not supposed to be owned by fred:fred but by fred:apache or some other group, then you can do a setgid on the /var/www/html/test directory with chmod g+s /var/www/html/test.

        Fred could also just do a chown fred:apache on the files, if they need to be owned by a different group.

        1 Reply Last reply Reply Quote 1
        • AdamFA
          AdamF
          last edited by

          Everytime permissions are reset by asterisk, the permissions are changed to asterisk:asterisk

          JaredBuschJ 1 Reply Last reply Reply Quote 0
          • JaredBuschJ
            JaredBusch @AdamF
            last edited by

            @fuznutz04 said in Permissions in Linux - Asterisk:

            Everytime permissions are reset by asterisk, the permissions are changed to asterisk:asterisk

            Then you need to write a small script to change the files back to what you need and then cron it to run ever X minutes/hours/whatever.

            Then tell the user that if he has a problem wait until the next cycle and it will fix it.

            1 Reply Last reply Reply Quote 0
            • coliverC
              coliver
              last edited by

              Or create a new location for his files and publish that with Apache.

              1 Reply Last reply Reply Quote 1
              • AdamFA
                AdamF
                last edited by

                Is one method preferred/better than the other? (script to change permissions vs changing file location of file)

                JaredBuschJ 1 Reply Last reply Reply Quote 0
                • JaredBuschJ
                  JaredBusch @AdamF
                  last edited by JaredBusch

                  @fuznutz04 said in Permissions in Linux - Asterisk:

                  Is one method preferred/better than the other? (script to change permissions vs changing file location of file)

                  To me, it would come down to WTF you are using these custom things for. Without that detail, I have no idea what would be better.

                  coliverC AdamFA 2 Replies Last reply Reply Quote 0
                  • coliverC
                    coliver @JaredBusch
                    last edited by coliver

                    @JaredBusch said in Permissions in Linux - Asterisk:

                    @fuznutz04 said in Permissions in Linux - Asterisk:

                    Is one method preferred/better than the other? (script to change permissions vs changing file location of file)

                    To me, it would come down to WTF you are using these custom things for. Without that detail, I have no idea what would be better.

                    Pretty much this. Are the specifically for the PBX? Or are they just being put there to be sent over the web?

                    JaredBuschJ 1 Reply Last reply Reply Quote 0
                    • JaredBuschJ
                      JaredBusch @coliver
                      last edited by JaredBusch

                      @coliver said in Permissions in Linux - Asterisk:

                      @JaredBusch said in Permissions in Linux - Asterisk:

                      @fuznutz04 said in Permissions in Linux - Asterisk:

                      Is one method preferred/better than the other? (script to change permissions vs changing file location of file)

                      To me, it would come down to WTF you are using these custom things for. Without that detail, I have no idea what would be better.

                      Pretty much this. Are the specifically for the PBX? Or are they just being put there to be sent over the web?

                      If it is the latter case, put it all in a different directory outside of /var/www/html and then add said directory to the apache conf files.

                      coliverC 1 Reply Last reply Reply Quote 0
                      • coliverC
                        coliver @JaredBusch
                        last edited by

                        @JaredBusch said in Permissions in Linux - Asterisk:

                        @coliver said in Permissions in Linux - Asterisk:

                        @JaredBusch said in Permissions in Linux - Asterisk:

                        @fuznutz04 said in Permissions in Linux - Asterisk:

                        Is one method preferred/better than the other? (script to change permissions vs changing file location of file)

                        To me, it would come down to WTF you are using these custom things for. Without that detail, I have no idea what would be better.

                        Pretty much this. Are the specifically for the PBX? Or are they just being put there to be sent over the web?

                        If it is the latter case, put it all in a different directory outside of /var/www/html and then add said directory to the apache conf files.

                        Or better yet get it off your PBX and onto a dedicated webserver.

                        1 Reply Last reply Reply Quote 2
                        • AdamFA
                          AdamF @JaredBusch
                          last edited by

                          @JaredBusch said in Permissions in Linux - Asterisk:

                          @fuznutz04 said in Permissions in Linux - Asterisk:

                          Is one method preferred/better than the other? (script to change permissions vs changing file location of file)

                          To me, it would come down to WTF you are using these custom things for. Without that detail, I have no idea what would be better.

                          We're querying a file in this location to get some information from the PBX such as current calls, queue information, etc for an internal piece of software. It doesn't have to be in that directory, so I'll go down t he path of just moving the files and referencing them. Hopefully FreePBX wont overwrite the apache conf file when upgraded/reloaded.

                          coliverC scottalanmillerS 2 Replies Last reply Reply Quote 0
                          • coliverC
                            coliver @AdamF
                            last edited by

                            @fuznutz04 said in Permissions in Linux - Asterisk:

                            @JaredBusch said in Permissions in Linux - Asterisk:

                            @fuznutz04 said in Permissions in Linux - Asterisk:

                            Is one method preferred/better than the other? (script to change permissions vs changing file location of file)

                            To me, it would come down to WTF you are using these custom things for. Without that detail, I have no idea what would be better.

                            We're querying a file in this location to get some information from the PBX such as current calls, queue information, etc for an internal piece of software. It doesn't have to be in that directory, so I'll go down t he path of just moving the files and referencing them. Hopefully FreePBX wont overwrite the apache conf file when upgraded/reloaded.

                            It probably will. There is an includes directory in the default conf somewhere, I don't know where, that references a directory without configurations in it. That's where you want to setup a new file/configuration.

                            1 Reply Last reply Reply Quote 0
                            • scottalanmillerS
                              scottalanmiller @AdamF
                              last edited by

                              @fuznutz04 said in Permissions in Linux - Asterisk:

                              @JaredBusch said in Permissions in Linux - Asterisk:

                              @fuznutz04 said in Permissions in Linux - Asterisk:

                              Is one method preferred/better than the other? (script to change permissions vs changing file location of file)

                              To me, it would come down to WTF you are using these custom things for. Without that detail, I have no idea what would be better.

                              We're querying a file in this location to get some information from the PBX such as current calls, queue information, etc for an internal piece of software. It doesn't have to be in that directory, so I'll go down t he path of just moving the files and referencing them. Hopefully FreePBX wont overwrite the apache conf file when upgraded/reloaded.

                              Why not push it directly to where you need it?

                              AdamFA 1 Reply Last reply Reply Quote -1
                              • AdamFA
                                AdamF @scottalanmiller
                                last edited by

                                @scottalanmiller said in Permissions in Linux - Asterisk:

                                @fuznutz04 said in Permissions in Linux - Asterisk:

                                @JaredBusch said in Permissions in Linux - Asterisk:

                                @fuznutz04 said in Permissions in Linux - Asterisk:

                                Is one method preferred/better than the other? (script to change permissions vs changing file location of file)

                                To me, it would come down to WTF you are using these custom things for. Without that detail, I have no idea what would be better.

                                We're querying a file in this location to get some information from the PBX such as current calls, queue information, etc for an internal piece of software. It doesn't have to be in that directory, so I'll go down t he path of just moving the files and referencing them. Hopefully FreePBX wont overwrite the apache conf file when upgraded/reloaded.

                                Why not push it directly to where you need it?

                                You mean push the original files in question to the PBX via script?

                                scottalanmillerS 1 Reply Last reply Reply Quote 0
                                • scottalanmillerS
                                  scottalanmiller @AdamF
                                  last edited by

                                  @fuznutz04 said in Permissions in Linux - Asterisk:

                                  @scottalanmiller said in Permissions in Linux - Asterisk:

                                  @fuznutz04 said in Permissions in Linux - Asterisk:

                                  @JaredBusch said in Permissions in Linux - Asterisk:

                                  @fuznutz04 said in Permissions in Linux - Asterisk:

                                  Is one method preferred/better than the other? (script to change permissions vs changing file location of file)

                                  To me, it would come down to WTF you are using these custom things for. Without that detail, I have no idea what would be better.

                                  We're querying a file in this location to get some information from the PBX such as current calls, queue information, etc for an internal piece of software. It doesn't have to be in that directory, so I'll go down t he path of just moving the files and referencing them. Hopefully FreePBX wont overwrite the apache conf file when upgraded/reloaded.

                                  Why not push it directly to where you need it?

                                  You mean push the original files in question to the PBX via script?

                                  I thought that they were already on the PBX. Push them to somewhere else via script is what I was thinking.

                                  JaredBuschJ 1 Reply Last reply Reply Quote 1
                                  • JaredBuschJ
                                    JaredBusch @scottalanmiller
                                    last edited by

                                    @scottalanmiller said in Permissions in Linux - Asterisk:

                                    @fuznutz04 said in Permissions in Linux - Asterisk:

                                    @scottalanmiller said in Permissions in Linux - Asterisk:

                                    @fuznutz04 said in Permissions in Linux - Asterisk:

                                    @JaredBusch said in Permissions in Linux - Asterisk:

                                    @fuznutz04 said in Permissions in Linux - Asterisk:

                                    Is one method preferred/better than the other? (script to change permissions vs changing file location of file)

                                    To me, it would come down to WTF you are using these custom things for. Without that detail, I have no idea what would be better.

                                    We're querying a file in this location to get some information from the PBX such as current calls, queue information, etc for an internal piece of software. It doesn't have to be in that directory, so I'll go down t he path of just moving the files and referencing them. Hopefully FreePBX wont overwrite the apache conf file when upgraded/reloaded.

                                    Why not push it directly to where you need it?

                                    You mean push the original files in question to the PBX via script?

                                    I thought that they were already on the PBX. Push them to somewhere else via script is what I was thinking.

                                    They (apparently) have custom scripts that pull data from Asterisk for use elsewhere. These scripts would have to reside on the Asterisk box.

                                    Of course they could rewrite things to remotely connect to asterisk and pull the data also, but I personally have no experience in doing that.

                                    AdamFA scottalanmillerS 2 Replies Last reply Reply Quote 0
                                    • AdamFA
                                      AdamF @JaredBusch
                                      last edited by

                                      @JaredBusch said in Permissions in Linux - Asterisk:

                                      @scottalanmiller said in Permissions in Linux - Asterisk:

                                      @fuznutz04 said in Permissions in Linux - Asterisk:

                                      @scottalanmiller said in Permissions in Linux - Asterisk:

                                      @fuznutz04 said in Permissions in Linux - Asterisk:

                                      @JaredBusch said in Permissions in Linux - Asterisk:

                                      @fuznutz04 said in Permissions in Linux - Asterisk:

                                      Is one method preferred/better than the other? (script to change permissions vs changing file location of file)

                                      To me, it would come down to WTF you are using these custom things for. Without that detail, I have no idea what would be better.

                                      We're querying a file in this location to get some information from the PBX such as current calls, queue information, etc for an internal piece of software. It doesn't have to be in that directory, so I'll go down t he path of just moving the files and referencing them. Hopefully FreePBX wont overwrite the apache conf file when upgraded/reloaded.

                                      Why not push it directly to where you need it?

                                      You mean push the original files in question to the PBX via script?

                                      I thought that they were already on the PBX. Push them to somewhere else via script is what I was thinking.

                                      They (apparently) have custom scripts that pull data from Asterisk for use elsewhere. These scripts would have to reside on the Asterisk box.

                                      Of course they could rewrite things to remotely connect to asterisk and pull the data also, but I personally have no experience in doing that.

                                      Correct, or another alternative would be to just write a script that copies the updated files from a source server, to the destination PBX(s). That would eliminate the need for the user fred to have to do anything at all.

                                      1 Reply Last reply Reply Quote 1
                                      • scottalanmillerS
                                        scottalanmiller @JaredBusch
                                        last edited by

                                        @JaredBusch said in Permissions in Linux - Asterisk:

                                        @scottalanmiller said in Permissions in Linux - Asterisk:

                                        @fuznutz04 said in Permissions in Linux - Asterisk:

                                        @scottalanmiller said in Permissions in Linux - Asterisk:

                                        @fuznutz04 said in Permissions in Linux - Asterisk:

                                        @JaredBusch said in Permissions in Linux - Asterisk:

                                        @fuznutz04 said in Permissions in Linux - Asterisk:

                                        Is one method preferred/better than the other? (script to change permissions vs changing file location of file)

                                        To me, it would come down to WTF you are using these custom things for. Without that detail, I have no idea what would be better.

                                        We're querying a file in this location to get some information from the PBX such as current calls, queue information, etc for an internal piece of software. It doesn't have to be in that directory, so I'll go down t he path of just moving the files and referencing them. Hopefully FreePBX wont overwrite the apache conf file when upgraded/reloaded.

                                        Why not push it directly to where you need it?

                                        You mean push the original files in question to the PBX via script?

                                        I thought that they were already on the PBX. Push them to somewhere else via script is what I was thinking.

                                        They (apparently) have custom scripts that pull data from Asterisk for use elsewhere. These scripts would have to reside on the Asterisk box.

                                        Understood. Was thinking that instead of saving the data locally, they could immediately push it elsewhere so that the perms wouldn't be an issue.

                                        1 Reply Last reply Reply Quote 1
                                        • 1 / 1
                                        • First post
                                          Last post