Author Topic: Data files created w/777 cannot be changed with FTP--HELP!  (Read 3730 times)

0 Members and 1 Guest are viewing this topic.

Offline moonpies

  • Pre-Newbie
  • Posts: 7
    • View Profile
I want to decrease security issues by NOT having data directories be 777. I just read this: "See in "includes/constants.php":
Code:
define('CHMOD_FILES', 0666);
define('CHMOD_DIRS', 0777);
Change this if you want. This works for all directories and files created by 4images."

My question is: When I change 0777 to 0755 in the contants.php file, it does not apply to category directories that were already made before the permissions were changed in the constants.php file. I cannot go and change the permisions on the data directories that were already made using FTP either. Please help!!! Do I have to start over and delete categories then re-upload files with the new permissions change in the constants.php file? If I don't have to start over with categories, what change in code will let me change permissions on categories that I already have made?

Thanks
Hi! How are you?

Offline moonpies

  • Pre-Newbie
  • Posts: 7
    • View Profile
Data files created w/777 cannot be changed with FTP--HELP!
« Reply #1 on: May 20, 2003, 05:01:23 AM »
Can anyone can help? I did a search and nothing came up for me that addressed the situation with how to change the permissions on data directories that were already created by 4images after changing the permissions in constants.php in the includes directory. You see, it seems that it cannot be changed with FTP client. Now, I assume that I may have to go back and re-make the categories and re-load images. But, after that, will category directories be created with permissions set at 0755 if I changed it from 0777 in the constants.php file or can files only be made 0777 no matter what?

thanks.
Hi! How are you?

Offline Chris

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.487
  • Did u ever stop to think and then forget to start?
    • View Profile
Data files created w/777 cannot be changed with FTP--HELP!
« Reply #2 on: May 20, 2003, 06:42:39 AM »
What's like to have happened is that 4images created those directories using the system defined php user.  This means your FTP user won't have permission to change the file/directory permissions.  You'll need to ask your hosting support to change the ownership of the files/directories in question to your ftp user.  Then you will be able to chmod as needed.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Data files created w/777 cannot be changed with FTP--HELP!
« Reply #3 on: May 20, 2003, 07:13:45 AM »
Quote from: Chris
What's like to have happened is that 4images created those directories using the system defined php user.  This means your FTP user won't have permission to change the file/directory permissions.  You'll need to ask your hosting support to change the ownership of the files/directories in question to your ftp user.

ah, *NIX are so tricky! :?
but without hosting support, can those folders be removed or changed permission by a script? (just for my personal knowlege :D)
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Chris

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.487
  • Did u ever stop to think and then forget to start?
    • View Profile
Data files created w/777 cannot be changed with FTP--HELP!
« Reply #4 on: May 20, 2003, 02:58:30 PM »
Possibly.  But you'd have to invoke the script from the same user so that means probably from a web browser.

UNIX systems aren't that tricky...  :wink:   You just have to think back to the days when modems were 300 baud.  Slow enough to warrant an operating system that used as little typing as possible.  That's why 'ls' is used for listing directory contents.  'vi' for visual editor (not very visual by today's standards)