Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

unable to delete/rename folder and files

Status
Not open for further replies.

dblaine

Technical User
Jul 28, 2002
36
CA
Hi folks,
Here i am having a strange problem on solaris 8
Through a Java api I am able to create a folder/file on the solaris say with a user nobody. But I am not able to delete the same folder/file through the same Java api for delete.

The folder/file after creation by default is having the following permissions
user nobody has all read, write and execute permissions,
group noboy has only read and execute permissions but no write permissions
Other is also having only read and execute permissions but no write permissions.

How to assign both the group and other all the permissions by default.

And how to delete/rename the file/folder.
Please suggest as i am on deadline.

thanks in advance
dblaine
 
For renaming, just type : chmod 777 /file
If you want it recursively, type : chmod -R 777 /file
What do you mean by default ? When creating a file ?
It's very dangerous to do that...
But add to your shell starting file the following line (.profile for bash) :
umask 000
As I said before, I disencouraged you to do this... All your files recently created will have rwxrwxrwx as rights... Could be dangerous !!!

Regarding your question : And how to delete/rename the file/folder.
You meant with your API or with shell ?
With shell, just use rm -rf /file or mv file_old_name file_new_name

See you
 
HI,

Thank you drice, it was nice .
Just one more is that i want to delete/rename the file/folder using the API/applets, Could you suggest any on this. This would be a great help for me.



thankyou,
dblaine

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top