January 17, 20179 yr I've had a couple of instances in the last week where the permissions of certain files and folders change (drop user access), resulting in me being unable to delete them. I therefore need to SSH into the server to manually delete through root. Both examples I've seen so far have been triggered by a Plex client trying to delete a file and it failing and locking the file. This has happened on 2 files, but 95% of the time it works fine. Any idea's what may be causing this? Also, as a side note from this, is there a GUI tool that can be used to delete files, or perhaps even to move files (drag and drop), rather than using SSH? I'm personally not comfortable using SSH, afraid I've going to miskey something Thanks.
January 17, 20179 yr You can try Midnight Commander (mc from the command line) as a simple tool in the SSH session. There are also some file manipulation dockers...
January 18, 20179 yr Author Just checking in to see if anyone has any ideas on the permissions issue?
January 18, 20179 yr Community Expert Can you go to the command line and show us the owner and permissions on an example?
January 18, 20179 yr Author Can you go to the command line and show us the owner and permissions on an example? Please see attached an example... Don't judge me
January 18, 20179 yr Community Expert You have a user share name "Plex Media". Within that user share you have a folder named Films, but that folder is owned by techserv instead of nobody. Any idea how that happened? Maybe techserv is the only user that can write/delete things in Film. Tools - New Permissions (Docker Safe) may be able to fix this now, but it won't keep it from happening again in the future if something is creating or changing these owner/permissions.
January 18, 20179 yr The problem is the permissions: -rw-r--r-- on your two files only have 'owner' write permission. When you say "you" can't delete them, probably you mean you can't delete them through some app? This is probably because that app is not running under user 'nobody' (maybe it's running under user 'techserv'?). Either the app which created those files needs to use same username as app you use to delete, or the app which created those files needs to grant 'w' permission to the group.
January 18, 20179 yr Author Well, I'm trying to delete the files from Plex and Plex is running on TechServ. The strange thing is, 95% of the time it works fine, but on the odd occasion, I'm unable to delete them and the permissions are as per the previously attached. So I guess the question is, why does it work most of the time, but sometimes, it doesn't? What would happen to cause it?
January 19, 20179 yr Author This has happened again today, with me or techserv unable to delete from the "Plex Media" folder, although we both have full read / write permissions? Any ideas what is causing it and how it can be prevented, as it's a strange one and very frustrating...?
January 19, 20179 yr Author Which Plex Docker are you running? Plex isn't running in a docker on unraid as it's not powerful enough, so it's running on another machine called 'techserv'.
January 19, 20179 yr Community Expert One possible solution would be to make your media shares public and get rid of the unRAID user techserv. Then techserv will have to use anonymous access and won't be able to take ownership of the files.
January 19, 20179 yr Author One possible solution would be to make your media shares public and get rid of the unRAID user techserv. Then techserv will have to use anonymous access and won't be able to take ownership of the files. So make the share open to the network with unlimited access? This will then give techserv access and will it still have read / write access? I assume anyone will effectively have read / write access?
January 19, 20179 yr Community Expert One possible solution would be to make your media shares public and get rid of the unRAID user techserv. Then techserv will have to use anonymous access and won't be able to take ownership of the files. So make the share open to the network with unlimited access? This will then give techserv access and will it still have read / write access? I assume anyone will effectively have read / write access? Yes, anyone would have read/write access, but if techserv doesn't exist as an unRAID user, then techserv will have to connect as the nobody user and techserv won't be able to set the owner to techserv so it will still be owned by nobody. There may be other ways to tackle this problem but I haven't run plexserver separately from unRAID for many years. Not clear to me why unRAID even thinks techserv is logged in as the techserv user, but I assume you must have created that user on unRAID and told plex to use it somehow.
January 19, 20179 yr Author Yes, anyone would have read/write access, but if techserv doesn't exist as an unRAID user, then techserv will have to connect as the nobody user and techserv won't be able to set the owner to techserv so it will still be owned by nobody. OK, that makes sense. Not 100% keen on the idea of having a totally open share, but... There may be other ways to tackle this problem but I haven't run plexserver separately from unRAID for many years. Not clear to me why unRAID even thinks techserv is logged in as the techserv user, but I assume you must have created that user on unRAID and told plex to use it somehow. techserv is a user I created to link the machine techserv to unraid. I've not given Plex any specific access or anything, it's purely at machine level, which is techserv and the techserv user. What is strange is that it works perfectly most of the time for new and old files created. But every now and then, I just can't delete the file with techserv, or any user with access to that share and have to Putty in using root. I just don't get what's causing it?
January 19, 20179 yr Community Expert What is strange is that it works perfectly most of the time for new and old files created. But every now and then, I just can't delete the file with techserv, or any user with access to that share and have to Putty in using root. I just don't get what's causing it? I would think that plex reads a lot more than it writes so maybe it didn't write anything you are trying to delete most of the time.
January 20, 20179 yr Author What is strange is that it works perfectly most of the time for new and old files created. But every now and then, I just can't delete the file with techserv, or any user with access to that share and have to Putty in using root. I just don't get what's causing it? I would think that plex reads a lot more than it writes so maybe it didn't write anything you are trying to delete most of the time. Perhaps Couchpotato isn't setting the permissions correctly when renaming? With that in mind, is there a way I can set permissions for sub folders and files within the 'Plex Media' folder?
January 20, 20179 yr Community Expert What is strange is that it works perfectly most of the time for new and old files created. But every now and then, I just can't delete the file with techserv, or any user with access to that share and have to Putty in using root. I just don't get what's causing it? I would think that plex reads a lot more than it writes so maybe it didn't write anything you are trying to delete most of the time. Perhaps Couchpotato isn't setting the permissions correctly when renaming? With that in mind, is there a way I can set permissions for sub folders and files within the 'Plex Media' folder? Is Couch running on techserv too?
January 20, 20179 yr Author What is strange is that it works perfectly most of the time for new and old files created. But every now and then, I just can't delete the file with techserv, or any user with access to that share and have to Putty in using root. I just don't get what's causing it? I would think that plex reads a lot more than it writes so maybe it didn't write anything you are trying to delete most of the time. Perhaps Couchpotato isn't setting the permissions correctly when renaming? With that in mind, is there a way I can set permissions for sub folders and files within the 'Plex Media' folder? Is Couch running on techserv too? No, that's actually running on unraid. Then once complete, nzb2media is run with CP renaming at the end.
January 21, 20179 yr I'm following along here, I've got a similar(ish) problem over at http://lime-technology.com/forum/index.php?topic=55740.0 - although my permissions aren't changing as WannabeMKII's are. And "root" is my rogue owner so deleting the user won't help ;-) I don't want to hijack this thread but if anyone can point me to the syntax for changing ownership/permissions by command line I'd be grateful!
January 30, 20179 yr Author OK, I'm having to post again, as I'm still having major issues and it's getting worse. For some reason, I can be watching a film or tv show, then for no reason, it stops playing. Then on checking, the permissions have changed for the file I was viewing, half way through!? I'm then unable to continue watching the program. I've tried having the Plex Media folder as 'public', but when I navigate to it through explorer on the machine running Plex, it requests a username and password. So I'm crying out to anyone who can help me with this, or anything I can do to resolve this, as it's driving me and people using Plex mad. Thanks in advance.
January 30, 20179 yr I'm afraid there's nothing in your most recent post that gives any information that might help diagnose your problem. Something seems to be changing file permissions so the best suggestion I can make is to disable your applications one at a time in order to narrow down the culprit.
January 30, 20179 yr Author OK, no problem. Whilst I do that, is there a command I can run on the 'Plex Media' folder that'll change that folder and all child folders to a certain permission, such as 0666?
January 30, 20179 yr Author OK, no problem. Whilst I do that, is there a command I can run on the 'Plex Media' folder that'll change that folder and all child folders to a certain permission, such as 0666 Found it. I used; cd /mnt/user/usershare1 chmod -R 0666 * I'll keep an eye on things and report back...
January 30, 20179 yr Something like this: find /path/to/folder -type d -print0 | xargs -0 chmod 0777 find /path/to/folder -type f -print0 | xargs -0 chmod 0666
Archived
This topic is now archived and is closed to further replies.