GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   mass chmod command-need help (https://gfy.com/showthread.php?t=720706)

sexybabe 04-03-2007 05:34 AM

mass chmod command-need help
 
i have sitemap.htm on all my sites (around 150) in my server.i want to chmod from 644 to 666.
is there shell script to mass chmod these particular files?
i tried this code but not working.
chmod -R 666 fullsitemap.htm

roly 04-03-2007 05:43 AM

Quote:

Originally Posted by sexybabe (Post 12187233)
i have sitemap.htm on all my sites (around 150) in my server.i want to chmod from 644 to 666.
is there shell script to mass chmod these particular files?
i tried this code but not working.
chmod -R 666 fullsitemap.htm

i'm not an expert on this stuff but maybe

chmod -R 666 */fullsitemap.htm

drjones 04-03-2007 06:03 AM

Quote:

Originally Posted by sexybabe (Post 12187233)
i have sitemap.htm on all my sites (around 150) in my server.i want to chmod from 644 to 666.
is there shell script to mass chmod these particular files?
i tried this code but not working.
chmod -R 666 fullsitemap.htm

something like this:

cd /your/web/root
find ./ -name sitemap.htm -exec chmod 666 "{}"\;

It should recursively chmod all the sitemap files in all the subdirectories of your web root.

Or if that has problems, this might work:

cd /your/web/root
chmod 666 `find ./ name sitemap.htm`

drjones 04-03-2007 06:07 AM

Also, BTW.. you sure you want to make those files on your webserver world writeable? Seems like whatever your trying to accomplish, theres gotta be a better way. Generally, its very bad practice to do something like that.

:2 cents:

sexybabe 04-03-2007 06:17 AM

thanks i will try this


All times are GMT -7. The time now is 12:25 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123