delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2022/09/26/10:27:58

X-Recipient: archive-cygwin AT delorie DOT com
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C684A3858CDA
Authentication-Results: sourceware.org;
dmarc=pass (p=none dis=none) header.from=hamishmb.com
Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=hamishmb.com
ARC-Seal: i=1; a=rsa-sha256; t=1664202399; cv=none; d=zohomail.eu; s=zohoarc;
b=IcMUaqpTxGWQO3RqtqlJbFs70eHxzyM5ha52MIFXkN224vMpQDbMGhhzL8OBNiIuTc5i4HdtTfIVE3toTBXbZK+JItKgwkxM8xJKbj3/ysB/wZh4lfdSMtXvnUnXlaBbpvYQraEJ0sO5wNALUDfC0xwrSzIf21QoNmZDRnnwN88=
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu;
s=zohoarc; t=1664202399;
h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To;
bh=hC2osdKNmP76qpfoD7zc26EaFl/RPSwHDsGS+HDAx8k=;
b=K/2dVwAlTAxOgs+qwB2HUWy9WHtV7d1duEfMbVmNq1VHHHzU2H8Ht+WsKuPAhI3t7JuFQfLVPljrUu2BR8AAg9ok5eMOsnDCewJL6iyn2kn4E0hjcgP5v+XGrqFUoHP1F5gI9BioMWJTM2QaW8UhqCAMfK/xF04aCSFbi0VFwww=
ARC-Authentication-Results: i=1; mx.zohomail.eu;
dkim=pass header.i=hamishmb.com;
spf=pass smtp.mailfrom=cygwin AT hamishmb DOT com;
dmarc=pass header.from=<cygwin AT hamishmb DOT com>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1664202399;
s=zmail; d=hamishmb.com; i=cygwin AT hamishmb DOT com;
h=Message-ID:Date:Date:MIME-Version:Subject:Subject:To:To:References:From:From:In-Reply-To:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To:Cc;
bh=hC2osdKNmP76qpfoD7zc26EaFl/RPSwHDsGS+HDAx8k=;
b=aj1eF1fPXy2Km1vwm0fWxvcxImQqQ3Yaq+dCmLt2fM9DQivww/nM2T3qTScF2DQD
/RgdE0SbeqtYFY95E77KdWgiX64gGiPYxT834XSbwhSPH6Klk+sxu0xvs4rV/Z9/E1w
gjucK5DELc5NS7ArOWVRxyokgXaDImRxtZZswes0=
Message-ID: <eed7c579-ef6f-1e25-7a39-a8010c801e6e@hamishmb.com>
Date: Mon, 26 Sep 2022 15:26:36 +0100
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Thunderbird/91.11.0
Subject: Re: Smartctl issues in Cygwin with elevated terminal
To: cygwin AT cygwin DOT com
References: <228fb395-f742-5d99-d108-f3394129d97e AT hamishmb DOT com>
<d5922237-d5ee-e82f-f35e-4fad284c7fb5 AT t-online DOT de>
From: Hamish McIntyre-Bhatty <cygwin AT hamishmb DOT com>
In-Reply-To: <d5922237-d5ee-e82f-f35e-4fad284c7fb5@t-online.de>
X-ZohoMailClient: External
X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A,
RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,
SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>

On 13/09/2022 18:23, Christian Franke wrote:
> Hamish McIntyre-Bhatty wrote:
>> I recently noticed that smartctl only works when the Cygwin Terminal 
>> isn't run as administrator - the opposite way round to Linux where you 
>> need superuser privileges to access the disk.
>>
>> With Administrator privileges on Windows 11, I get:
>>
>> "Read Device Identity Failure Input/Output error"
> 
> This likely happens because one of the tried pass-through I/O-controls 
> returns an error code which does not mean "not implemented". This is a 
> limitation or bug in the driver of the disk controller.
> 
> For further diagnostics, try for example. 'smartctl -r ioctl,2 -i /dev/sda'
> 
> 
>>
>> But it continues to work fine as a normal user.
> 
> When run without admin rights for a SATA device, smarctl may print:
> "Warning: Limited functionality due to missing admin rights"
> and then prints only limited device identify and SMART DATA information 
> returned by IOCTL_STORAGE_QUERY_PROPERTY and IOCTL_STORAGE_PREDICT_FAILURE.
> 
> Other functionality requires admin rights and a working pass-through 
> I/O-control - try 'smartctl -x /dev/sda'.
> 
> 
> Please note that the above is not Cygwin specific as it applies to both 
> (Cygwin and Mingw-w64) Windows builds of smartctl. Use this ML for 
> related support requests:
> https://listi.jpberlin.de/mailman/listinfo/smartmontools-support
> 
> 
>>
>> Does anyone know why? In my case, this actually matters because I'm 
>> not sure how to elevate and/or drop privileges in Cygwin, as sudo 
>> doesn't work due to it not being Unixy underneath.
> 
> To drop privileges, try 'cygdrop' tool from 'cygutils-extra' package.
> 
> 

Thanks.

I can confirm that this only seems to be an issue in QEMU - it's a disk 
controller and/or driver issue as you suggested it might be.

cygdrop will hopefully resolve my issue.

Hamish

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019