What does "chmod" mean in this context ?

Discussion in 'Mac Programming' started by fab5freddy, Mar 8, 2009.

  1. macrumors 65816

    fab5freddy

    Joined:
    Jan 21, 2007
    Location:
    Heaven or Hell
    #1
    What does "chmod" mean in this context ?

    2.) chmod click.dat to 666 using your FTP software.

    thanks !
     
  2. macrumors 603

    notjustjay

    Joined:
    Sep 19, 2003
    Location:
    Canada, eh?
    #2
    chmod is the name of a Unix command used to change file permissions.

    "666" means read/write permissions are granted for everyone. The three numbers represent a file permission code for the owner of the file, the group of users that the owner is a part of, and everyone else. The "6" is a decimal representation of a 3-bit binary code representing whether you have permission to read a file, write to the file, or execute the file (e.g. a program).

    Think of it this way: Add 4 points if you want the user to be able to read the file, 2 points if they can write to it, and 1 point if they can execute it. Access to a directory counts as 1 point as well.

    So, for example, "644" would be a code meaning that the owner of the file has full read/write access, but everyone else can only read it. "740" would mean that the owner can read/write and execute the program, the people in the same user group can read the file but not run it, and everyone else has no access at all.

    If you were running the command from the Terminal, you would literally type "chmod 666 click.dat".
    You can often do this within the FTP software, and is typically required if you are, saying, uploading a script that wants to write to certain files or directories -- you need to set the permissions to allow it to do so.
     
  3. macrumors 6502

    Joined:
    Mar 7, 2006
    Location:
    Knutters Knoll, Melbourne
    #3
    It's asking you to change the permissions on the file click.dat to be readable and writable by your user, group and anyone else. Normally you'd just run the command

    chmod 666 click.dat

    in the directory the file resides in using terminal. As for the FTP bit, don't know, I haven't ftp'd since 1989.
     
  4. thread starter macrumors 65816

    fab5freddy

    Joined:
    Jan 21, 2007
    Location:
    Heaven or Hell
    #4
    Regarding FTP......Is there something better out there now,
    since you havent used FTP since 1989 ??
     
  5. macrumors 6502

    Joined:
    Mar 7, 2006
    Location:
    Knutters Knoll, Melbourne
    #5
    Perhaps I should have said that I haven't had a need to use it since 1989. I wasn't trying to be facetious.
     
  6. macrumors 68040

    lee1210

    Joined:
    Jan 10, 2005
    Location:
    Dallas, TX
    #6
    scp and sftp add encryption to authentication and transfer. FTP is unencrypted. If you don't mind someone being able to log in as you on the remote system, or you've secured the connection otherwise then FTP is fine.

    -Lee
     
  7. macrumors P6

    Peace

    Joined:
    Apr 1, 2005
    Location:
    Space--The ONLY Frontier
    #7
    A lot of apps use FTP to transfer files. Adobe Dreamweaver and other Web design apps for example.
     
  8. macrumors 6502a

    Joined:
    Mar 6, 2008
    #8
    A lot do. That doesn't make it a good idea. I'll +1 on Lee's suggestion of using scp or sftp unless it's across a VPN or other encrypted connection, at which point, yes, standard FTP is just fine.
     

Share This Page