I would like to know how i can display all the groups on my server. It is a redhat 7.x machine with php 4. I am unable to do sql queries because it does not have permission to write to the tmp folder. I need to know first what all my groups are so i then add the right group with my web machine account and mysql account. Does anyone know how to do this?

Thanks,

    you don't need to know all the groups on your server... just the one that your apache is running as... since that one controlls php and hence php acts with its permissions...

    try a

    ps -aux | grep httpd

    this will find all the processes on your computer currently running that include the string httpd, which should be apache. you can modify this for whatever server you are running, perhaps BOA 🙂

    the first entry ( on the left ) should be the user who ownes that process

    that user is the one you should worry about

    $5 says that with a default install it is either 'nobody' or 'apache'

    once you know the user try:

    finger <user>
    or
    groups <user>

    'groups' will spill out something like <user> : <group> <group>

    ednark : ednark wheel www

    then you are in business, pick the group you want, and change the directory permissions

      i am getting a mysql error?

      Can't create/write to file '/tmp/#sql4cb_68fcd2_0.MYI' (Errcode: 13)

        show the chunck of code that is throwing that error... and try to actually find the actual line... please don't just post 500 lines of random code...

        start a smaller file and try and see whats the smallest bit of code you can make the will reproduce that error

        if you are not useing a mysql_ function than it is not a mysql error

          i am almost postive it is not a code error. a few days ago i changed permissions on the /tmp folder and now mysql won't run this one query(?) everything else seems to run perfect though. this is for a search engine on a discussion board using mysql database.

          When i run the query i get this error?

          MySQL said:

          Can't create/write to file '/tmp/#sql4cb_690040_0.MYI' (Errcode: 13)

          I have plenty of disk space and people can post and read the board as normal, only when running a search does this error comeup. Does anyone no if mysql needs permissions to write to the /tmp to do a query or what might be causing this?

          thanks,

            yes mysql needs permissions to the directory if it is reading/writing temporary files there.... however i don't know if mysql uses /tmp specifically for anything...

            mysql databases are just files in themselves, so perhaps msyql uses tmp to store the results of a query before as it makes them... it has to somewhere, i just figured it was in memory, but perhaps it does make a file in tmp

            if the problem started when you changed permission to that directory... and sql complained... easy.. then change the permissions back... or specifically give mysql user permissions to that dir, or include mysql user in a group that does have permissions

              BTW thanks for all your help. I created a group gave it permissions to the temp folder and i am still getting the errors. i have no clue what the sql error would be if it is a sql error since i do not know the database structure and i paid for it commerically

                and i paid for it commerically

                oh.. well then, its not your responsibility.. its theirs get on the horn

                  2 months later

                  Hi,

                  I am new to thos forum
                  I have the same problem. Here is the error message :

                  Biblio Probleme SELECT Sources_Auteur , Sources_TitleRef , Sources_TitleRevue , Sources_TitleDetail , Sources_City , Sources_Publisher , Sources_Year , Sources_Volume , Sources_Page FROM SOURCES,NOTICE_2_SOURCES WHERE NOTICE_2_SOURCES.Source_ID=SOURCES.Sources_ID AND Notice_ID=223 AND Sources_Status=1 AND Sources_Type=3 ORDER BY Sources_TitleRef ASC ;ERR:Can't create/write to file '/tmp/#sql7d28_246_1.MYI' (Errcode: 13)

                  If you have any idea, it will be very helpfull

                  Thanks Fred

                  PS : it works without "ORDER BY" argument !

                    I recently had a similar error after upgrading PHP. I do not remember which version of PHP it was, but I would be interested to know what version of PHP you two are running.

                      In fact the chmod of /tmp folder has changed to 755, it's the reason why it wasn't working.
                      The problem, it's I don't know it changed!

                      Fred

                        Sorry,
                        I am running PhP 4.0.6

                        Fred 🙂

                          you can change permissions on a directory with the chmod unix command

                          so a

                          man chmod

                          for more specific instructions

                          might wanna try

                          chmod /tmp 765

                          do you know how permissions work on linux?

                            Write a Reply...