mysql - CHMOD 777 on Directories for Database to be Able to Write (Help Me Understand) -
i have limited understanding of mysql's interaction centos 7 server , need help.
basically, have wordpress installation , need set uploads directory , directories within chmod 777 upload images via backend. chmod 775 doensn't work though. baffled me , not willing unserstand risks , how can exploited. giving public write permissions in folder , bad right?
my database user has privileges database , database connects. website works minus writing part. don't understand how mysql user relates local centos user @ all. don't believe linked anywhere , if wrong how that?
the reason thinking due chmod 775 not working meaning said database user not user or member of group required have said access , able write. hence why need local write permissions enabled.
===================================================
more info
os: centos 7 , server: nginx , database: mariadb , php: php 5.4.3
local user directory: /home - chmod 755, chown root:root
local users /home/usr1 - chmod 501, chown usr1:usr1 , /home/usr2 - chmod 501, chown usr2:usr2
contains website www: /home/usr1/www - chmod 775, chown usr1:usr1 , /home/usr2/www - chmod 775, chown usr2:usr2
rest of files/directories: chown usr1:usr1 files in www , chown usr2:usr2 files in respective www
chown 775 directories in www
chown 644 files in www
so when connect database wordpress installation, how in heck know use root, usr1 or usr2. tried putting them in group see happens didn't work. thought worth shot.
any help, advice, education , , forth appreciated. me if can please :)
==================================================
i have access via ssh, on vps , far know have complete access. if have solution requires me stuff, cool. can stuff!
chown apache:apache wp-content
.... did trick. way see user set file permission 777 in uploads , directories aka recursively. check owner of uploaded file , voila, chown (to owner).
also user not set nginx.conf in case. set php.ini , whoever down voted idiot.
further clarfication passkit seems not understand: yes not set 777 permissions. temporary solution can go , check server using write files. after setting 777 permissions , uploading file change permissions 775 or 755 if on shared hosting.
Comments
Post a Comment