Normally, this is not advised to put 777 on public_html as this give the permission to everybody that are working on your server.
Based the info that you have provided, you can see that the ower are different and also the group.
In one case you have:
owner / group = demo10m / demo10m
An with /public_html/
owner / group = demo9my / nobody
The problem is there.
If at least you have the same group, this will avoid you to provide a 777 (owner, group, everybody). So you could have (775) or (770).
With your chown, you give a different path than the previous.
You have asked to change the owner of the directory demo10m and not the one demo9m
I suppose that demo9m and demo10m are two different account in your hosting provider.
If as I suppose you are using different hosting account, you should either use a unique account or change the ower or at least the group to have the permission.
With your result, I see 2 different owners with 2 different group and also 2 different path.
So start to use a unique path and NOT
/home/demo9my/public_html/
/home/demo10m/public_html
Once you will have the same path, decide at least in which group you want the user have the permission and NOT the group like the one you have for the moment
demo10m
nobody
After that you could use a chmod 775
and if you want to use a chmod 755
you also have to use the same owner and NOT
demo10m
demo9my
I think that in your case, the expected result would be either
Unique path /home/demo10m/public_html
With owner demo10m
and group demo10m
if you want also use the path /home/demo9my/public_html/
you should change its owner to
With owner demo10m
and group demo10m
Here put 10 for the path 9
|