Bug 470262 - Konsole can't start in the directory without the execute permission
Summary: Konsole can't start in the directory without the execute permission
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
: 469249 475116 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-05-25 15:03 UTC by trmdi
Modified: 2024-03-15 21:10 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description trmdi 2023-05-25 15:03:52 UTC
STEPS TO REPRODUCE
1. Konsole > Edit current profile > General > choose "Start in same directory as current session"
2. Change the current user to root and go to any directory that the normal user doesn't have the execute permission
3. open a new tab or split view

ACTUAL RESULT:
Konsole shows the error:
> Warning: Could not start program '/bin/bash' with arguments ''.
> Warning: chdir: Permission denied

EXPECTED RESULT:
When the user doesn't have the execute permission, Konsole should start in the Initial directory
Comment 1 Bug Janitor Service 2024-03-10 21:09:27 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/konsole/-/merge_requests/961
Comment 2 Christian Muehlhaeuser 2024-03-11 10:54:42 UTC
*** Bug 469249 has been marked as a duplicate of this bug. ***
Comment 3 Christian Muehlhaeuser 2024-03-11 10:55:26 UTC
*** Bug 475116 has been marked as a duplicate of this bug. ***
Comment 4 Kurt Hindenburg 2024-03-15 21:10:06 UTC
Git commit e4840a2e7cbf006821fbbac5128eaaf585f8125a by Kurt Hindenburg, on behalf of Christian Muehlhaeuser.
Committed on 15/03/2024 at 21:06.
Pushed by hindenburg into branch 'master'.

Fallback to home dir if initial working dir is inaccessible

In cases where the initial working is inaccessible by the current
user, we should fallback to their home directory.

This can easily be triggered by changing the working dir to an
otherwise inaccessible dir for the current user (e.g. /etc/sudoers.d
inside a root shell), followed by opening a new session.
Related: bug 469249, bug 475116

M  +3    -1    src/session/Session.cpp

https://invent.kde.org/utilities/konsole/-/commit/e4840a2e7cbf006821fbbac5128eaaf585f8125a