I have input path: /var/www/site.com/1/2/3/4/file.php
I want to: set chmod 755 on each element after /var/www/site.com/
e.g. do that by universal algorithm:
chmod ('/var/www/site.com/1/', 0755);
chmod ('/var/www/site.com/1/2/', 0755);
chmod ('/var/www/site.com/1/2/3/', 0755);
chmod ('/var/www/site.com/1/2/3/4/', 0755);
chmod ('/var/www/site.com/1/2/3/4/file.php', 0755);
Can you help me, Please?
P.S.: Just only chmod full path, not recursive.