This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Issue with the eggdrop filesystem

General support and discussion of Eggdrop bots.
Post Reply
]
]x[
Voice
Posts: 16
Joined: Mon Jan 09, 2006 7:23 pm

Issue with the eggdrop filesystem

Post by ]x[ »

System info : eggdrop v1.9.1, on Linux 5.10.63-v7l+

What i'm trying to archieve is that files uploaded into the eggdrop file system get served up online. So I changed the file system directory into a directory in my /var/www folder. Added the user (pi) which runs the bot to the (www-data) group. Umask = 0022

But whatever I try, it keeps uploading the files with the following permissions: 0600 and thus these files can not be opened online. I had it working on my previous raspberry but the OS ran out of LTS so hence the upgrade to fresh OS(raspbian) and the 1.9 eggdrop (previous was 1.6).

Can someone please help me because i asked multiple experienced linux users but nobody seems to be able to figure out the issue. It would be greatly appreciated if someone could assist me on this.

High regards,
]x[
Online
w
willyw
Revered One
Posts: 1197
Joined: Thu Jan 15, 2009 12:55 am

Re: Issue with the eggdrop filesystem

Post by willyw »

]x[ wrote: ... it keeps uploading the files with the following permissions: 0600

...

That reminded me of something in eggdrop.conf. Have you found and tried changing this?

Code: Select all

# Note that the default 0600 is the most secure one and should only be changed
# if you need your files for shell scripting or other external applications.
set userfile-perm 0600

I don't remember ever using the file system myself, beyond perhaps playing with it a time or two - and that was long ago.
Don't hesitate to join the Eggdrop channel. It has moved away from freenode. We hang out on the Libera irc network now.
irc.libera.chat #eggdrop
If you happen to catch one around, there are some real eggdrop gurus there.
If you don't get it solved in here, try there.
Best of luck with it.
For a fun (and popular) Trivia game, visit us at: irc.librairc.net #science-fiction . Over 300K Q & A to play in BogusTrivia !
]
]x[
Voice
Posts: 16
Joined: Mon Jan 09, 2006 7:23 pm

Re: Issue with the eggdrop filesystem

Post by ]x[ »

Yeah i tried setting the userfile-perm to 0600, but no change. And if you read the description in the config it states that its for the permanent files like user, notes, chan files. But tried it anyway with no result and those file do have the correct according permission hehe. Still thanks for reading my question and trying to answer it mate :) And ill put that channel in my join script so I can ask around if this place doesn't work out hehe
]
]x[
Voice
Posts: 16
Joined: Mon Jan 09, 2006 7:23 pm

Post by ]x[ »

Solution through a TCL script, thanks Geo, Neil and other people in the chat.

Put the code below in a .tcl file and load that as a script in your bot. It will change the permissions to 0664 after the file is received.

Code: Select all

bind rcvd - * set_permissions

proc set_permissions {handle nick filepath} {
  file attributes $filepath -permissions 0664
}

# Loading
putlog "Loaded : DCC File Permissions Correction Script"

Online
w
willyw
Revered One
Posts: 1197
Joined: Thu Jan 15, 2009 12:55 am

Post by willyw »

]x[ wrote:Solution through a TCL script,...
Isn't that interesting? I hadn't thought that far - yet. I suppose that my brain stopped at thinking that it was something configurable in eggdrop.

It almost sounds like they have encountered it in the past. ;)

I suppose they have a reason for it being the way that it is, and not configurable.

I'm glad you found somebody that could give you a solution, and thank you for taking a moment to say so, and post said solution in here for others, in the future.
:)
For a fun (and popular) Trivia game, visit us at: irc.librairc.net #science-fiction . Over 300K Q & A to play in BogusTrivia !
]
]x[
Voice
Posts: 16
Joined: Mon Jan 09, 2006 7:23 pm

Post by ]x[ »

willyw wrote:
]x[ wrote:Solution through a TCL script,...
Isn't that interesting? I hadn't thought that far - yet. I suppose that my brain stopped at thinking that it was something configurable in eggdrop.

I'm glad you found somebody that could give you a solution, and thank you for taking a moment to say so, and post said solution in here for others, in the future.
:)
Well to make the issue even more interesting, as I didn't try this out before. I just went into the file system and in there I created a fresh directory for some stuff I wanted to store in a separate folder. Guess what rights where given to that directory.

Directory has : rwxr-xr-x aka 0755 and pi as group & owner.

So when it creates a directory out of nothing it gets a different permission then when it creates a new file. This only makes the situation even stranger haha.

So not sure if I should put in a bug report or something. If so please let me know?, or if someone want to take a look into the system through ssh/partychat thats also possible :)

Regards,
]x[
Online
w
willyw
Revered One
Posts: 1197
Joined: Thu Jan 15, 2009 12:55 am

Post by willyw »

]x[ wrote: ...
So not sure if I should put in a bug report or something. If so please let me know?,...
Regarding a bug report - I can't say. Sorry. I just don't know.

I suppose though, that you could give this link:

http://forum.egghelp.org/viewtopic.php?p=110411#110411

to the folks that you already chatted with. It would bring them right to this thread, so you don't have to repeat what you've already said - and perhaps one of them might even reply here. It might make it easier to communicate.

I'm sorry that I don't have a more direct answer for you.
For a fun (and popular) Trivia game, visit us at: irc.librairc.net #science-fiction . Over 300K Q & A to play in BogusTrivia !
]
]x[
Voice
Posts: 16
Joined: Mon Jan 09, 2006 7:23 pm

Post by ]x[ »

no problem mate :)
]
]x[
Voice
Posts: 16
Joined: Mon Jan 09, 2006 7:23 pm

Post by ]x[ »

Btw while i was fiddeling around I tried to change the setting:

copy-to-tmp 1

But when i changed that to 0 it wouldn't even write away the file. Maybe that information is helpfull for the above issue.

Regards,
]x[
Post Reply