aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: PermissionsFiles in amuled Incoming Directory  (Read 3222 times)

goauld

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 5
PermissionsFiles in amuled Incoming Directory
« on: June 29, 2005, 04:00:10 PM »

i have amuled installed under a linux account called amuled, and a script in init.d starting the amule daemon at linux boot under the account amuled, it works ok, all downloaded
files goes to /home/amuled/.aMule/Incoming ,

The problem is that files are ever created with this permissions:
rw----r-T   amuled amuled

and i want

rw-rw-r--   amuled amuled

how to achieve this?

i edited amule.conf and changed the line:
PermissionsFiles=644
i checked values like 666 777 600 etc.  nothing of this worked

who knows an answer for this Question?

Thank you
Logged

PsychoChris

  • Jr. Member
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 66
@ goauld
« Reply #1 on: June 29, 2005, 05:16:30 PM »

Had the same problem and couldn't find a way to do it through aMule settings so i wrote a script which sets the rights of all files in a directory at a user defined timeintervall to whatever rights i want.
If you're not used to shell scripts i could post it here for you. But perhaps someone elses solved it with aMule settings.

Greetings,
Chris
Logged

stefanero

  • Some Support
  • Developer
  • Hero Member
  • *****
  • Karma: 8
  • Offline Offline
  • Posts: 4235
Re: PermissionsFiles in amuled Incoming Directory
« Reply #2 on: June 29, 2005, 06:34:32 PM »

well pretty easy answer :)

the file and folder persmissions are saved as dec not as ocatal what 777 is

so just use kcal or wahtever to calculate the right value :)

for example

if you wnat 777 use this as oct in kcal and then convert it to oct which is 511

so
666 -> 438

and so on :)

make sure you stop amule(d) before you cahnge that

stefanero
Logged
In its default setup, Windows XP on the Internet amounts to a car
parked in a bad part of town, with the doors unlocked, the key in
the ignition and a Post-It note on the dashboard saying, "Please
don't steal this."

goauld

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 5
i still dont get it
« Reply #3 on: June 30, 2005, 12:08:33 AM »

you give me some light with the octal thing but it still dont works
511 gives me rwxr-xr-x

i tried again lots of combinations and the best one was 511, maybe the umask defined in $home/.bash_profile is playing against me, it is set to 002 and i dont know what can a i do so none of the combination gave me a g+w or o+w and the T bit appears sometimes.. this is very frustrating and
confusing thing

on the other hand i dont like scripts doing things at specified time intervals
Logged

goauld

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 5
Finally it works
« Reply #4 on: June 30, 2005, 01:31:13 AM »

i found the solution to the problem

after create .profile .bashrc .bash_profile in the amuled $homedir specifing umask = 002 wich should permit a group +w permission ... it didnt worked!

the thing was, my UMASK global environment variable is set to 022 for all users, and the comand i
used in the init script por starting amuled at bootup was

su amuled -s /bin/bash -c "/usr/local/bin/amuled -f" &

but the command sucks because "su" dont reads the variables specified in the user homedir BUT the global ones.

for "su" to read the user homedir variables the right command should be:

su - amuled -s /bin/bash -c "/usr/local/bin/amuled -f"

so, with that and the octal thing it worked
i hope not to screw my head with things like this very often
bye
Logged