public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Cygwin does not include admin full rights to home directories
@ 2019-11-29 10:29 KAVALAGIOS Panagiotis (EEAS-EXT)
  2019-11-29 12:02 ` Kptain
  0 siblings, 1 reply; 3+ messages in thread
From: KAVALAGIOS Panagiotis (EEAS-EXT) @ 2019-11-29 10:29 UTC (permalink / raw)
  To: cygwin

Dear all,

I am preparing the Cygwin windows package to be installed through Landesk to all developer's machines. I have managed to prepare a silent installation from a local repository, but the uninstallation script is not working due to insufficient permissions:

[INFO] Powershell command: Remove-item -Path "C:\Program Files\Cygwin" -ErrorAction Stop -ErrorVariable RemoveErrors -Recurse -Force
[ERROR] Installation failed. Details: Access to the path 'C:\Program Files\Cygwin\home\kavalpa\.dbus' is denied.
[INFO] Process success or error code: 1
[ERROR] The returned error code do not match any of the accepted codes. Command execution might have failed

which is normal, as the administrator has no access. Only the use normal user has full control. I have tried to change permissions to no avail:

[INFO] Changing recursively ACL permissions
[INFO] Setting recursively ACL to parent directory C:\Program Files\Cygwin
[ERROR] Recursive Permissions failed. Details: Access to the path 'C:\Program Files\Cygwin\home\kavalpa\.dbus' is denied.
[INFO] Recursive Permission success or error code: 1
[ERROR] The returned error code do not match any of the accepted codes. Permission set-up might have failed

and the same goes for command line to reset the permissions:

C:\EEAS IS Installations\LanDesk\RedHat-Cygwin-3.0.7>C:\Windows\System32\icacls.exe "C:\Program Files\Cygwin\*" /Q /C /T /RESET
C:\Program Files\Cygwin\home\kavalpa: Access is denied.
C:\Program Files\Cygwin\home\kavalpa\.bashrc: Access is denied.
C:\Program Files\Cygwin\home\kavalpa\.bash_history: Access is denied.
C:\Program Files\Cygwin\home\kavalpa\.bash_profile: Access is denied.
C:\Program Files\Cygwin\home\kavalpa\.dbus: Access is denied.
...

Is there any way to remove the installation in a more automatic manner, without having to do what is proposed in the Cygwin FAQ:

https://cygwin.com/faq/faq.html#faq.setup.uninstall-all
4. Delete the Cygwin root folder and all subfolders. ... If you get a 'Permission Denied' error then you will need to modify the permissions and/or ownership of the files or folders that are causing the error. 

From my point of view, it is an issue for Cygwin to create user files without Administrator Full Control. The Administrator/root should be able to delete everything. My system is Win10 and I am using 64bit version of Cygwin. Thank you very much in advance.

Kind regards,

Panos Kavalagios

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Cygwin does not include admin full rights to home directories
  2019-11-29 10:29 Cygwin does not include admin full rights to home directories KAVALAGIOS Panagiotis (EEAS-EXT)
@ 2019-11-29 12:02 ` Kptain
  2019-11-29 12:26   ` KAVALAGIOS Panagiotis (EEAS-EXT)
  0 siblings, 1 reply; 3+ messages in thread
From: Kptain @ 2019-11-29 12:02 UTC (permalink / raw)
  To: cygwin


Hi,


If you want to remove old Cygwin installation, you have 2 choices:

 - if install has been done for all users, just remove Cygwin folder from
Windows Explorer
 
 - if install has been done just for current user requiring admin rights,
just start a new cygwin session with bash or csh; go to cygwin folder and
then type: \rm -rf "Cygwin_folder";. In this case some system files have
been installed, only removable by file owner.


Regards,

Stéphane



--
Sent from: http://cygwin.1069669.n5.nabble.com/Cygwin-list-f3.html

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: Cygwin does not include admin full rights to home directories
  2019-11-29 12:02 ` Kptain
@ 2019-11-29 12:26   ` KAVALAGIOS Panagiotis (EEAS-EXT)
  0 siblings, 0 replies; 3+ messages in thread
From: KAVALAGIOS Panagiotis (EEAS-EXT) @ 2019-11-29 12:26 UTC (permalink / raw)
  To: cygwin

> Hi,
> 
> 
> If you want to remove old Cygwin installation, you have 2 choices:
> 
>  - if install has been done for all users, just remove Cygwin folder from
> Windows Explorer
> 
>  - if install has been done just for current user requiring admin rights, just
> start a new cygwin session with bash or csh; go to cygwin folder and then
> type: \rm -rf "Cygwin_folder";. In this case some system files have been
> installed, only removable by file owner.

Hi Stéphane,

I am not sure I understand your distinction. The installation was performed with the following command:

setup-x86_64.exe -q -A -L -l "cygwin-repo" -R "C:\Program Files\Cygwin" -P autoconf,automake,bash-completion,binutils,curl,emacs,git,git-svn,gnupg2,inetutils,konsole,mc,openssh,patchutils,perl,python2,python3,rsync,ruby,subversion,tcsh,tmux,unzip,vim,vim-common,wget,xinit,xlaunch,xorg-server,xorg-server-common,xorg-server-xorg,xorg-x11-fonts-dpi100,xorg-x11-fonts-dpi75,xorg-x11-fonts-Type1,xorg-x11-fonts-misc,xterm,zip

Setup does not have any option for single or all users. It has only for non-admin installation (-B / --no-admin), where you obviously there is no permission issue, as all files are owned by the installation user.

However, following your recommendation, I have tried the following command:

"C:\Program Files\Cygwin\bin\rm.exe" -rf --no-preserve-root "/cygdrive/c/Program Files/Cygwin"

which seems to work pretty well so far. Thank you very much.

Panos

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-11-29 10:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-29 10:29 Cygwin does not include admin full rights to home directories KAVALAGIOS Panagiotis (EEAS-EXT)
2019-11-29 12:02 ` Kptain
2019-11-29 12:26   ` KAVALAGIOS Panagiotis (EEAS-EXT)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).