Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 409365 - app-misc/mc-4.8.2-r1 saving file on top of directory changes dir's permissions
Summary: app-misc/mc-4.8.2-r1 saving file on top of directory changes dir's permissions
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Sergei Trofimovich (RETIRED)
URL: https://www.midnight-commander.org/ti...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-22 19:58 UTC by Marcin Mirosław
Modified: 2012-03-28 11:09 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcin Mirosław 2012-03-22 19:58:19 UTC
Saving file on top of directory changes dir's permissions.


Reproducible: Always

Steps to Reproduce:
$ mkdir testtest
$ stat testtest
  File: `testtest/'
  Size: 4096            Blocks: 8          IO Block: 4096   directory
Device: fd04h/64772d    Inode: 75          Links: 2
Access: (0700/drwx------)  Uid: ( 1000/  marcin)   Gid: ( 1000/  marcin)
Access: 2012-03-22 17:27:48.815833915 +0100
Modify: 2012-03-22 17:27:48.815833915 +0100
Change: 2012-03-22 17:27:48.815833915 +0100
 Birth: -

$ mceedit
<write something>
<F2-> enter file name->testtest>
"A file already exists with this name" -> choose "Overwrite"
"File has hard-links. Detach before saving?"-> choose "Yes"
"Cannot save file"->Dismiss
<and again without quiting mceedit>
<F2-> enter file name->testtest>
"A file already exists with this name" -> choose "Overwrite"
<hey, where is question about hard links?>
"Cannot save file"->Dismiss
<quit qithout saving>
$ stat testtest/
  File: `testtest/'
  Size: 4096            Blocks: 8          IO Block: 4096   directory
Device: fd04h/64772d    Inode: 75          Links: 2
Access: (0644/drw-r--r--)  Uid: ( 1000/  marcin)   Gid: ( 1000/  marcin)
Access: 2012-03-22 17:27:48.815833915 +0100
Modify: 2012-03-22 17:27:48.815833915 +0100
Change: 2012-03-22 17:28:47.265891420 +0100

Please look at permissions, they are changed.
Comment 1 Sergei Trofimovich (RETIRED) gentoo-dev 2012-03-27 16:55:50 UTC
Pushed upstream's patch as:

> *mc-4.8.2-r2 (27 Mar 2012)
>
>  27 Mar 2012; Sergei Trofimovich <slyfox@gentoo.org>
>  +files/mc-4.8.2-fix-existing.patch, +mc-4.8.2-r2.ebuild, -mc-4.8.2-r1.ebuild,
>  -mc-4.8.2.ebuild:
>  Fix bug #409365 by Marcin Mirosław (broken permissions when attempt to save
>  file on top of directory). Patch picked from upstream.

Thanks again, Marcin!
Comment 2 Marcin Mirosław 2012-03-28 11:09:27 UTC
Thanks!