WannabeMKII Posted January 17, 2017 Share Posted January 17, 2017 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. Quote Link to comment
tdallen Posted January 17, 2017 Share Posted January 17, 2017 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... Quote Link to comment
WannabeMKII Posted January 18, 2017 Author Share Posted January 18, 2017 Just checking in to see if anyone has any ideas on the permissions issue? Quote Link to comment
trurl Posted January 18, 2017 Share Posted January 18, 2017 Can you go to the command line and show us the owner and permissions on an example? Quote Link to comment
WannabeMKII Posted January 18, 2017 Author Share Posted January 18, 2017 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 Quote Link to comment
trurl Posted January 18, 2017 Share Posted January 18, 2017 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. Quote Link to comment
limetech Posted January 18, 2017 Share Posted January 18, 2017 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. Quote Link to comment
WannabeMKII Posted January 18, 2017 Author Share Posted January 18, 2017 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? Quote Link to comment
WannabeMKII Posted January 19, 2017 Author Share Posted January 19, 2017 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...? Quote Link to comment
tdallen Posted January 19, 2017 Share Posted January 19, 2017 Which Plex Docker are you running? Quote Link to comment
WannabeMKII Posted January 19, 2017 Author Share Posted January 19, 2017 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'. Quote Link to comment
trurl Posted January 19, 2017 Share Posted January 19, 2017 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. Quote Link to comment
WannabeMKII Posted January 19, 2017 Author Share Posted January 19, 2017 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? Quote Link to comment
trurl Posted January 19, 2017 Share Posted January 19, 2017 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. Quote Link to comment
WannabeMKII Posted January 19, 2017 Author Share Posted January 19, 2017 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? Quote Link to comment
trurl Posted January 19, 2017 Share Posted January 19, 2017 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. Quote Link to comment
WannabeMKII Posted January 20, 2017 Author Share Posted January 20, 2017 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? Quote Link to comment
trurl Posted January 20, 2017 Share Posted January 20, 2017 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? Quote Link to comment
WannabeMKII Posted January 20, 2017 Author Share Posted January 20, 2017 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. Quote Link to comment
mimwdv Posted January 21, 2017 Share Posted January 21, 2017 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! Quote Link to comment
WannabeMKII Posted January 30, 2017 Author Share Posted January 30, 2017 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. Quote Link to comment
John_M Posted January 30, 2017 Share Posted January 30, 2017 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. Quote Link to comment
WannabeMKII Posted January 30, 2017 Author Share Posted January 30, 2017 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? Quote Link to comment
WannabeMKII Posted January 30, 2017 Author Share Posted January 30, 2017 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... Quote Link to comment
John_M Posted January 30, 2017 Share Posted January 30, 2017 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 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.