• 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

Permission denied exception on saving file to filesystem

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All

I was trying to save an uploaded file at the location where application(war) is deployed on tomcat server(free hosting plan) by trying getServletContext().getRealPath() but it returned null instead of path but this worked on local machine . Than I tried to save files to local filesystem on server (let us suppose /var/tmp/../file/) but it thrown an exception Permission denied even though the server gets the locations write and read permissions as true . Below is the code:-



I doubt that the problem is with the security policy of the hosting service but not sure . So guys can you please suggest on this.

Thanks in advance

 
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

Rituraj tyagi wrote:I doubt that the problem is with the security policy of the hosting service but not sure



Quite likely the hosting service does have a security policy which prevents you from using their disk space. Does your contract with the service mention that?
 
Bartender
Posts: 1111
Eclipse IDE Oracle VI Editor
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Paul Clapham wrote:

Rituraj tyagi wrote:I doubt that the problem is with the security policy of the hosting service but not sure



Quite likely the hosting service does have a security policy which prevents you from using their disk space. Does your contract with the service mention that?


especially as it is free
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic