egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Issue with the eggdrop filesystem

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Eggdrop Help
View previous topic :: View next topic  
Author Message
]x[
Voice


Joined: 09 Jan 2006
Posts: 13

PostPosted: Sat Oct 23, 2021 8:16 pm    Post subject: Issue with the eggdrop filesystem Reply with quote

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[
Back to top
View user's profile Send private message
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1141

PostPosted: Sun Oct 24, 2021 10:25 am    Post subject: Re: Issue with the eggdrop filesystem Reply with quote

]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:

# 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 !
Back to top
View user's profile Send private message
]x[
Voice


Joined: 09 Jan 2006
Posts: 13

PostPosted: Sun Oct 24, 2021 1:22 pm    Post subject: Re: Issue with the eggdrop filesystem Reply with quote

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 Smile And ill put that channel in my join script so I can ask around if this place doesn't work out hehe
Back to top
View user's profile Send private message
]x[
Voice


Joined: 09 Jan 2006
Posts: 13

PostPosted: Wed Oct 27, 2021 2:25 pm    Post subject: Reply with quote

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:

bind rcvd - * set_permissions

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

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

Back to top
View user's profile Send private message
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1141

PostPosted: Wed Oct 27, 2021 3:50 pm    Post subject: Reply with quote

]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. Wink

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.
Smile
_________________
For a fun (and popular) Trivia game, visit us at: irc.librairc.net #science-fiction . Over 300K Q & A to play in BogusTrivia !
Back to top
View user's profile Send private message
]x[
Voice


Joined: 09 Jan 2006
Posts: 13

PostPosted: Thu Oct 28, 2021 6:30 pm    Post subject: Reply with quote

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.
Smile


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 Smile

Regards,
]x[
Back to top
View user's profile Send private message
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1141

PostPosted: Thu Oct 28, 2021 11:13 pm    Post subject: Reply with quote

]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 !
Back to top
View user's profile Send private message
]x[
Voice


Joined: 09 Jan 2006
Posts: 13

PostPosted: Fri Oct 29, 2021 6:24 am    Post subject: Reply with quote

no problem mate Smile
Back to top
View user's profile Send private message
]x[
Voice


Joined: 09 Jan 2006
Posts: 13

PostPosted: Wed Nov 03, 2021 3:29 pm    Post subject: Reply with quote

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[
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Eggdrop Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber