Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi. I have tomcat streaming files using one of my webapps, and if the file is from a certain directory on an external drive, I'd like to delete the file after streaming it, but tomcat needs root permissions to do so. I've tried changing the owner and permissions on the folder itself but it I get an "Operation not permitted" error.
Hi. I have tomcat streaming files using one of my webapps, and if the file is from a certain directory on an external drive, I'd like to delete the file after streaming it, but tomcat needs root permissions to do so. I've tried changing the owner and permissions on the folder itself but it I get an "Operation not permitted" error.
Thanks.
Not alot of information to go on. Were you root when you tried to change owner/permissions on that directory? And you'll also have to change perms on the files too....
As root, run "chmod -R 777 <directory where your files are>". VERY unsafe, though, and to be used sparingly. I'd do a "chmod -R 755 <directory>", then change owners of the file(s) to be the tomcat user/group, which should let it delete those files.
Not alot of information to go on. Were you root when you tried to change owner/permissions on that directory? And you'll also have to change perms on the files too....
As root, run "chmod -R 777 <directory where your files are>". VERY unsafe, though, and to be used sparingly. I'd do a "chmod -R 755 <directory>", then change owners of the file(s) to be the tomcat user/group, which should let it delete those files.
Those are basically the two things I tried, yeah. I opened a terminal as root, tried first doing "chmod 777 directory" (whilst the directory was empty), which didn't report any errors, but didn't actually change the permissions.
Then I tried "chown tomcat directory" and that one gave me an Operation not permitted error, even though I was trying it as root.
I have external windows computers adding files to the folder (it's on a samba share) and the files are automatically owned by root, so it's not really feasible to change the file permissions each time, because I want the files to be immediately accessible by tomcat.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.