Results 1 to 8 of 8
  1. #1

    Auto CHMOD Script Running in the backround

    I am attempting to setup a script which will automatically append the proper file permissions [posix & acl's] to any new files on certain folders that I specify.

    Someone Recommended

    find /Users/Kevin/Desktop/TRANSFER -type f -exec chmod 777 {} \;

    This only seems to run once and when new files put in I have to have the script run every so often as a cronjob, I really just want to have a script to change the permissions of files going into a folder.

    If anybody knows of a solution this would be greatly appreciated. Thank you!

  2. #2
    Have you set this as cron ?

    You can make a cron to run every 15 minutes.

  3. #3
    How are the files uploaded to the folder? If you're the one uploading them, you may be able to configure your FTP client to chmod them immediately after uploading, removing the need for a script entirely.

  4. #4
    Join Date
    Dec 2007
    Location
    Indiana, USA
    Posts
    16,087
    Just setting the line you added as a cron on a 10 or 15 minute basis should work just fine.

    JulesR is also correct - if they are being uploaded via FTP the client can chmod them automatically - if you are using a PHP script you can configure it to exec('chmod') the file as well.
    Michael Denney - MDDHosting LLC
    New shared plans for 2016! Check them out!
    Highly Available Shared, Premium, Reseller, and VPS
    http://www.mddhosting.com/

  5. #5
    Join Date
    Jul 2009
    Location
    Charlotte, NC
    Posts
    42
    Quote Originally Posted by MikeDVB View Post
    Just setting the line you added as a cron on a 10 or 15 minute basis should work just fine.

    JulesR is also correct - if they are being uploaded via FTP the client can chmod them automatically - if you are using a PHP script you can configure it to exec('chmod') the file as well.
    Even a 1 minute cron shouldn't be an issue, if someone is impatient.

  6. #6
    The issue is not a FTP server is an OSX workplace and a network share, Some people don't know how to set permissions on there files. I am trying to find out a way that a File goes into a directory and looks for new files, and chmod's the file accordingly than setting the permissions on all files every minuet.

  7. #7
    Join Date
    Dec 2007
    Location
    Indiana, USA
    Posts
    16,087
    you could simply set on a cron every few minutes to chmod the whole folder recursively.

    As an example:
    Code:
    chmod 0755 /the/folder/here -R
    Michael Denney - MDDHosting LLC
    New shared plans for 2016! Check them out!
    Highly Available Shared, Premium, Reseller, and VPS
    http://www.mddhosting.com/

  8. #8
    So there is no way to do it automaticly, I already have a cronjob setup, I just would like to have every file upon entry change automatically.

Similar Threads

  1. Auto CHMOD script?
    By NodePlex in forum Hosting Security and Technology
    Replies: 10
    Last Post: 07-31-2007, 07:22 PM
  2. Helped Needed: Can't CHMOD to 666/Auto reverts to 766
    By CLKeenan in forum Dedicated Server
    Replies: 3
    Last Post: 12-22-2005, 12:21 AM
  3. Auto-Host 2 PHP Script | Auto WHM Account Creation | Paypal Billing
    By listenmirndt in forum Other Web Hosting Related Offers
    Replies: 1
    Last Post: 09-21-2004, 11:46 PM
  4. Auto-Host 2 | WHM & Paypal Auto-Account Creation Script - Just Released
    By listenmirndt in forum Other Offers & Requests
    Replies: 0
    Last Post: 07-06-2004, 04:41 AM
  5. Auto-Host (WHM auto-account creation PHP script) Giveaway/Trade Promotion
    By listenmirndt in forum Other Offers & Requests
    Replies: 0
    Last Post: 06-19-2004, 01:56 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •