Jump to content

File Permissions in shared folder


LTF

Recommended Posts

Hi,

I have uTorrent set to put completed downloads in a directory that is shared on the network, so that I can immediately access the files over the network. They go into the root directory of that shared directory, not some sub-directory of the share.

When files finish downloading they don't seem to have the correct file permissions (presumably as defined by the shared parent directory) so that when I access them over the network I get 'Access Denied'. If I then copy the files to another directory that is shared (either a sub-directory of the folder where they are placed on completion, or a whole other directory that is shared) then everything works fine - the act of moving them seems to fix the permissions, even if it's just from SharedCompletedDir\ to SharedCompletedDir\Sub\. (I'm talking about dragging the files in Windows Explorer by the way, not some kind of script or DOS command)

I'm using XP on both machines, and Simple File Sharing. I doubt it's important but for full info, I started running this install (a year or so ago) with Simple File Sharing turned off, and later turned it on.

I've been noticing this since uTorrent 1.7.2. I should have posted something a while back but I figured it had already been noted. My guess is that either the files are given standard permissions, or permissions that match the download directory rather than the completed directory, and none of those include permissions to share across the network. I'm not sure, though now I type this it suggests that I should try sharing the download directory and see if it makes a difference... Er, if I get a chance to try that I'll post back with results.

I really hope you can fix this, it's finally getting to me after years of working around it.

Thanks for a great app.

Link to comment
Share on other sites

Dear Ultima,

Agreed, Indeed it is a little similar, and I also enjoyed reading your discussion about the philosophy of the thing. Having read the thread you mentioned, I do think that uTorrent is 'responsible' for the file right up until it is completed and placed in the nominated directory, and as such it is responsible for setting the permissions right according to its final destination; after all Microsoft give us an OS with defined behaviours, and it's up to us, the users and programmers, to work within those parameters to get it to do what we want and to behave in useful ways, including modifying the default behaviours, so if we want the completed files to have the correct permissions then uTorrent needs to go ahead and set them.

Philosophy aside, it's kind of an annoying situation when using uTorrent on networked computers but can be fixed easily by the uTorrent writers, and that's why I think it's a bug.

I have tested, and yes, sharing my Download folder over the network will solve this bug. To quote Achbed from the other thread, 'Oh man, that's ugly, but it now works.' But I don't really want to share that folder, that's like sharing a temp directory. Only bad things can come of it (eg User:'Oh, I found a movie that wouldn't play so I deleted it' or whatever).

Let's hope uTorrent will fix this in the next release.

Thanks for your input, it was interesting.

Link to comment
Share on other sites

  • 1 month later...

Yep, I have the same issue. Stopped sharing my DOWNLOADING folder and couldn't share moved files or folders off the bat (had to re-share the FINISHED folder in win settings - sooooo annoying).

Took me a min... well 45 of them actually... to work out what was going wrong.

One thing I do to stop my idiot house mates from damaging half downloaded files is make utorrent label incomplete files with .ut

prefs>general>When downloading> Append.!.ut to incomplete files

That way when the icon is different over the network they know its not in yet.

This is useful when you set only one episode in a series torrent to download

and then ALL the incomplete files move into the completed folder.

No more:

'Why wont episode two play?'...

'Cause its not F'ng in yet!!!'...

'But its in the completed folder and looks normal?'

'That's cause I only downloaded one episode to see what Big Bang Theory was like. Now that I know, I have to disassociate myself from all my friends who told me to watch it... wait a minute... did you just say you wanted to watch episode two??? Thats it!!!! Pack up ya s$%t and get out!!! You disgust me!!!!'

Link to comment
Share on other sites

  • 1 year later...

so this thread is probably dead, but I had the same problem and solved it by using the 'Run program' option in the advanced preferences of utorrent. Basically I made a small script that changes the permissions of a file and directory so that the 'Everyone' user has read permissions to the new file and directories uTorrent downloads (simple way of allowing access across local network).

O ye, apparently other people solved this problem by changing the temp directory uTorrent saves the files into to a shared folder, but I did that and still had this problem; for some reason my pc just wont let the new files and directories inherit the permissions of its parent folder :/

The script I use:


@ECHO OFF
IF %1=="" GOTO do_dir
icacls %1 /grant Everyone:(R) 1>> c:\torrent_permissions.txt 2>&1
:do_dir
IF %2=="" GOTO end
icacls %2 /grant Everyone:(R) /t /c 1>> c:\torrent_permissions.txt 2>&1
:end

I placed that in some text file, renamed it to something like set_torrent_permissons.cmd and placed it in my windows/system32 folder so that it can be executed from any location in command prompt by just calling the name given to the little batch script.

I then added the following line to the 'Run this program when a torrrent finishes' field on the Run Program dialog:

set_torrent_permissions "%F" "%D"

Note the above script will pipe all output from the icacls command to the file c:\torrent_permissions.txt, so if you don't want that just wipe out everything after the 1>> (including the >>1) in the lines containing the icacls command.

Link to comment
Share on other sites

  • 8 months later...
  • 3 months later...

I had the same problem.

This is because the downloaded files inherit the sharing permission from when they were created. As utorrent stores the files in one directory while downloading, then moves the files to a directory you specify when they finish downloading, the sharing permission they end up with is inherited from the first directory.

SOLUTION:

1. Go to utorrent preferences -> directories

2. Set the "put new downloads in" directory to your_shared_folder\incomplete

3. Set the "move completed downloads to" directory to your_shared_folder

Link to comment
Share on other sites

  • 1 month later...

I just found that problem and thank you very much for the solution. I used the solution by Citizensnips to have the folder with the incompleted downloads inside the shared folder and to keep it simple for my roommates i simply made it hidden. They don't know it is there. (I know they can find out if they want to.. :) Keeps them out of messing with incompleted downloads.

Link to comment
Share on other sites

  • 3 months later...

Hey Folks,

The problem mentioned above has been a pain in my ass for ages, so I decided to tackle this outside mTorrent. You do this (in Windows XP):

1. You let mTorrent put completed files into one directory, say "d:\completed"

2. Make a new text file, which you call "whatever.bat". Only the extension matters.

3. Right-click, choose "edit" and copy this line in the file: "cacls d:\completed /T /E /G Everyone:C" (without the ", of course). You can change the directory to taste, the rest of the line shouldn't be tampered with. Save.

4. Now you'll make an exe out of the bat:

5. Open mTorrent's preferences and go to Advanced/Run Program. Have the exe run whenever a torrent finishes.

With every finished torrrent the permissions of all files and directories will be changed, so it may be an idea to use the completed directory smallish and move files to their final destination once in a while.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...