aMule Bug Tracker - aMule
View Issue Details
0000788aMulePreferencespublic2006-01-16 15:562006-01-17 19:14
resolvedno change required 
0000788: aMule does not create files with amule.conf/PermissionFiles value
I wanted to read my files of Incoming directory from other users so I tried to change the permissions with files are created by aMule.

Because I wanted 666 for files, I give to "PermissionsFiles" the value 438 (666). I started aMule, however the file are created with 644. What's wrong?

It seems to be a bug!
-rw-r--r-- p2p p2p noon.mp3
No tags attached.
Issue History
2006-01-16 15:56SeveinNew Issue
2006-01-17 08:43KryNote Added: 0001795
2006-01-17 09:27SeveinNote Added: 0001797
2006-01-17 09:29SeveinNote Added: 0001798
2006-01-17 11:16XaignarNote Added: 0001799
2006-01-17 14:57SeveinNote Added: 0001801
2006-01-17 17:04XaignarStatusnew => resolved
2006-01-17 17:04XaignarFixed in Version => CVS
2006-01-17 17:04XaignarResolutionopen => no change required
2006-01-17 17:04XaignarAssigned To => Xaignar
2006-01-17 17:04XaignarNote Added: 0001802
2006-01-17 17:32SeveinStatusresolved => feedback
2006-01-17 17:32SeveinResolutionno change required => reopened
2006-01-17 17:32SeveinNote Added: 0001803
2006-01-17 17:38SeveinNote Added: 0001804
2006-01-17 19:14XaignarStatusfeedback => resolved
2006-01-17 19:14XaignarResolutionreopened => no change required

2006-01-17 08:43   
Folder permisions? umask output? Info we need.
2006-01-17 09:27   
(from umask)
umask 0022

(ls -ld to all the parent dirs)
drwxr-xr-x 3 root root 96 Jun 9 2005 /home/
drwxr-xr-x 4 p2p p2p 184 Jan 4 12:26 /home/p2p/
drwx------ 4 p2p p2p 768 Jan 17 09:42 /home/p2p/.aMule/
drwxr-x--- 2 p2p p2p 296 Jan 17 00:43 /home/p2p/.aMule/Incoming/

(from ps aux)
p2p 6916 2.8 9.1 61124 23408 ? Ssl Jan15 69:43 /usr/bin/amuled

(the user)
p2p /home/p2p /bin/false

The user who runs amuled has false shell (included in /etc/shells) because I do not want anyone login with that user.

Something more? All you need.
2006-01-17 09:29   
System uname: i686 Pentium II (Deschutes)
gcc 3.4.4
2006-01-17 11:16   
Taken from "man 2 umask":
       The umask is used by open(2), mkdir(2), and other system calls
       that create files to modify the permissions placed on newly cre-
       ated files or directories. Specifically, permissions in the umask
       are turned off from the mode argument to open(2) and mkdir(2) (so,
       for example, the common umask default value of 022 results in new
       files being created with permissions 0666 & 0000018:0000022 = 0644 = rw-
       r--r-- in the usual case where the mode is specified to open(2) as

In other words, you get your 666 permission, minus the umask, which equals 644.
2006-01-17 14:57   
I understand. However, don't you think aMule should try to set the wished permissions for those files downloaded trying to forget umask? This would give more flexiblity to users who don't prefer to change his umask only for aMule needs.

Thanks for your great support and sorry for my bad English, :).
2006-01-17 17:04   
Actually, it would be less flexible if aMule ignored the umask. You can simply set it to zero with the umask command if you dont wish to have it affect aMule.
2006-01-17 17:32   
Xaignar, I wouldn't like to be annoying with this but if the user set umask to 000 this will affect all his enviroment! Moreover, sometimes, amuled is run by an user without shell or /bin/false like the assigned shell.
2006-01-17 17:38   
My friend rg3 told me I could do this:
umask 000
exec /ruta/al/amule