![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Programmer
Join Date: Aug 2005
Posts: 66
Rep Power: 0
![]() |
calling chmod in java
Hi all,
I was wondering if anybody out there has delt with getting java to change permissions in unix. (i.e. able to call things like chmod and chown) I found a thrid party module that might to the trick: http://www.purpletech.com/code/doc/c...l/IOUtils.html Has anybody used this before? Does anybody know of a better way? Thanks a lot! ![]() |
|
|
|
|
|
#3 |
|
Programmer
Join Date: Aug 2005
Posts: 66
Rep Power: 0
![]() |
Thanks for the find titaniumdecoy!
Process p = Runtime.getRuntime().exec("chmod 444 file.txt"); Process p = Runtime.getRuntime().exec("chown foo:group file.txt"); Does the trick! Let's all do a dance in celebration! :banana: (Sorry...just had to get him in there) |
|
|
|
|
|
#4 |
|
Sexy Programmer
|
:banana: :banana: :banana: :banana: :banana: :banana: :banana: :banana: :banana: YAY!!! |
|
|
|
|
|
#5 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
![]()
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|