• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JCIFS SmbFile setAttribute() function & SmbFile access permission

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic