• Post Reply Bookmark Topic Watch Topic
  • New Topic

JCIFS SmbFile setAttribute() function & SmbFile access permission  RSS feed

 
Kay Lee
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello
im beginner on jcifs. i want to set file permission for SmbFile. can anyone show me how to do it? i would like to set permission read/write to everyone.
btw can anyone explain what the use of setAttribute() from SmbFile function.



thanks
regards,
Kay
 
Paul Clapham
Sheriff
Posts: 22185
38
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just had a look at the API documentation and I see that SMBFile has a setReadWrite() method. Seems to me that should take care of your first question, no?

As for what setAttribute() does, remember that jCIFS is for accessing a Windows file system. So the method allows you to modify the attributes of a Windows file, which are "Archived", "Hidden", "Read-only", and "System". Check out the documentation for SMBFile and you'll see how exactly to modify those attributes.
 
Kay Lee
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i thought so. but even with using , i doesnt manage to get the file to have read/write access for everyone.
any ideas other than using the API? the file is located in shared drive in network. so i think its not as easy as to set in local drive.
 
Paul Clapham
Sheriff
Posts: 22185
38
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you're asking about setting permissions for various people and groups, it doesn't look like jCIFS supports that.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!