How do I change the permissions in my php files, They are registered to the root and would like for the user to be able to use them

If you wish httpd to run as a different user or group, you must run

httpd as root initially and it will switch.

#

User/Group: The name (or #number) of the user/group to run httpd as.

. On SCO (ODT 3) use "User nouser" and "Group nogroup".

. On HPUX you may not be able to use shared memory as nobody, and the

suggested workaround is to create a user www and use that user.

NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET)

when the value of (unsigned)Group is above 60000;

don't use Group #-1 on these systems!

#
User apache
Group apache

My files are for root user and would like for the user to be

User fish
Group fish

How do I change the permission from root to fish on the files.

Thank you for anyone who helps

    nothing to do with what user apache runs under, its whoever created the files or maybe the way you have permissions setup on your htdocs folder.

    anyway, to change owner, su to root then run;

    chown fish:fish filename

      I was able to change the user and group in a recursive mode. That worled perfectly, but I still have my problem. I cannot view some files on my computer (http://localhost) and also I cannot edit the files with an fopen function. The mode is 777.

      I thought maybe it was the user, so I decided to change it and still have no access to those files.

      I'm running FC3.

      Would you know what I can do so I can fix it.

      Thank you

        24 days later

        Well, the above (chown) just changes the ownership, not the access. This is a complex subject, and you should read the man page at man chmod, but a simple way to get everyone able to read and access, but not write to the file is

        chmod 755 [filename]

        where [filename] is the filename that you what to change. The numbers are based on adding the following values:

        4 read
        2 write
        1 execute/traverse

        and they are ordered as

        user group other

        This means that the user that owns the file has read, write, and execute permissions. Anyone in the group that owns the file can read and execute the file, and anyone else can read and execute the file. But I'd make sure to read the man page for chmod, as there are many other abilities as well (sticky bits, etc). Hope this helps.

          Write a Reply...