Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
2.6k views
in Java FTP by (160 points)
Can you steer me towards documentation on the meaning of the String returned by FTPFile.getPermissions() ? I get a string returned something like "-rwxr-xr-x", but I'm not sure how to interpret the string. Basically, I'm trying to discover whether a file is readable, read-only, or writable.

Thanks,

Mark

2 Answers

0 votes
by (162k points)
These are basically Unix permissions.

r == read permission
w == write permission
x == execute permission

The first set is for the user who owns the file (rwx), the second set is for the user group (r-x, so it is lacking write permission for the user group), and the third set (r-x, same as group) is for all other users.

The dash,'-' at the start means it is a file, otherwise it will have a 'd' for directory.
0 votes
by (160 points)
...for your prompt reply. It's refreshing. Might I be so bold as to suggest adding a short discussion to JavaDocs?

Cheers,

Mark

Categories

...