Permissions change & prevents me deleting


Recommended Posts

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.

Link to comment

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.

Link to comment

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.

Link to comment

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?

Link to comment

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?

Link to comment

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.

Link to comment

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?

Link to comment

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.
Link to comment

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?

Link to comment

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?
Link to comment

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.

Link to comment

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!

Link to comment
  • 2 weeks later...

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.

Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.