r-exams sh permission denied – Stack Overflow

I’ve a simple 2004_p_k_19.Rnw file:

exname{Hold forgása}
extype{schoice}
exsolution{0100}
exshuffle{4}
begin{question}
  A Holdnak mindig ugyanaz az oldala fordul a Föld felé. Milyen kapcsolat
  van ennek alapján a Hold Föld körüli keringésének és tengelyforgásának
  periódusideje között?
  begin{answerlist}
    item A Hold nem forog a tengelye körül.
    item A Hold annyi idő alatt fordul meg a tengelye körül, amennyi idő alatt
      megkerüli a Földet.
    item A Hold kétszer annyi idő alatt fordul meg a tengelye körül, mint
      amennyi idő alatt megkerüli a Földet.
    item A Hold fele annyi idő alatt fordul meg a tengelye körül, mint amennyi
    idő alatt megkerüli a Földet.
  end{answerlist}
end{question}

And an .R file:

library("exams")

exams2pdf(
  file='2004_p_k_19.Rnw',
  name="csillagaszat",
  n=1,
  nsamp=1,
  encoding='utf8'
)

When I try run this .R:

Loading required namespace: tinytex
sh: : Permission denied

What is the problem and how can I fix it?

custom permission level – Sharepoint Restricted View for all sites

I am not getting restricted view for all sites , I have used SharePoint Custom API for setting new role permission. now I want restricted view for all the site, can we add permission through rest API ? Is there any API which provide add custom permission ? I do not want to do it manually . What will be my approach ? Kindly guide me

boot – colord-sane: io/hpmud/musb.c 2101: Invalid usb_open: Permission denied

I get the following errors all in a row in my journalctl after booting, and I’m not sure if this is a problem with hplip or colord-sane:

/hpfax[5559]: [5559]: error: Failed to create /var/spool/cups/tmp/.hplip
colord-sane[4901]: io/hpmud/musb.c 2101: Invalid usb_open: Permission denied
colord-sane[4901]: io/hpmud/musb.c 2101: Invalid usb_open: Permission denied
colord-sane[4901]: io/hpmud/musb.c 2101: Invalid usb_open: Permission denied
colord-sane[4901]: io/hpmud/musb.c 2101: Invalid usb_open: Permission denied
colord-sane[4901]: io/hpmud/musb.c 2101: Invalid usb_open: Permission denied

I don’t know if it’s related to this post, but the permission denied issue looks very similar. I tried going through those steps looking for parallels between saned and colord-sane but wasn’t sure what user to add to which file, or what group it needed to be added to.

Cannot drop the user because it does not exist or you do not have permission

I am getting this message for some users when executing sp_revokedbaccess procedure for database users. Users I am trying to remove are selected from sys.database_principals with type = S, W or G (sql server or windows users) and are not system users (principal_id > 4). I checked if the user I can’t remove owns any schema and it is not the case. The user is not an orphan user also. I am comparing a user that was removed and a user that gave me this error and can’t find any differences. I do see the user in the database security folder so it does exist and has a corresponding server login (no sid mismatch). Also I am a sysadmin on a server level and should have permissions. I am stock with this last couple days and can’t solve it. I am not a DBA, just a developer and may be there is something else i am missing. Please help.

development – SystemUpdate() inside my remote event receive will raise “Access denied. You do not have permission to perform this action or access this resource.”

I have the following code inside my remote event receiver (which run on item added):-

 using (ClientContext context = TokenHelper.CreateRemoteEventReceiverClientContext(properties))
            {
              currentItem("OrderAssignToApprover2") = new FieldUserValue() { LookupId = spUser.Id };
              currentItem.SystemUpdate();

now if a non-admin user add an item then the remote event receiver will raise this error on the SystemUpdate():-

Access denied. You do not have permission to perform this action or access this resource.

but if admin user add an item then the remote event receiver will works fine OR if i change the remote event reicever to run using App Permsion, as follow:-

using (ClientContext context = Helpers.GetAppOnlyContext(properties.ItemEventProperties.WebUrl))
            {
              currentItem("OrderAssignToApprover2") = new FieldUserValue() { LookupId = spUser.Id };
              currentItem.SystemUpdate();

so can i assume that the SystemUpdate (unlike Update) require the user to have full control on the site?If this is the case then is there a way to allow non-admin users to execute SystemUpdate?
Thanks

javascript – Force request for Canvas permission data (Firefox)

I have some very simple functionality to allow a user to draw on a canvas, then upload the drawing. The code in question was taken from another Stack Overflow question. I then want to pass the picture to my backend:

const canvas = document.getElementById("user-image-canvas");
const dataUrl = canvas.toDataURL("image/png;base64;");

const file = dataURLtoBlob(dataUrl);
let fd = new FormData();
fd.append("image", file);

fetch(drawingsUrl, {
  method: 'POST',
  body: fd
}).then(res => ........

Here is the blob conversion, for comprehension.

  // Convert dataURL to Blob object
  function dataURLtoBlob(dataURL) {
    // Decode the dataURL
    var binary = atob(dataURL.split(",")(1));

    // Create 8-bit unsigned array
    var array = ();
    for (var i = 0; i < binary.length; i++) {
      array.push(binary.charCodeAt(i));
    }

    // Return our Blob object
    return new Blob((new Uint8Array(array)), { type: "image/png" });
  }

(It’s possible that is not optimal, but it works regardless)

My problem is:
Whenever a Firefox user first comes to the site, they do not yet have canvas permissions enabled. The (wrong) flow is this:

  1. User draws on canvas
  2. User clicks button to trigger the above
  3. Firefox gives a canvas request popup
  4. Simultaneously, the toDataUrl returns something representing an empty canvas
  5. The empty canvas is POSTed
  6. Even if the user allows it, we are still getting an empty image

On subsequent visits, there won’t be a problem.

Is there any way I can either:

  1. Force the permission request beforehand? I couldn’t find a connection in the permissions api.
  2. Have the DataUrl return a promise, to wait for the user clicking the popup.

sql server 2012 – Permission to select sys tables in stored procedure

I have implemented the stored procedure to check if a specific (schema).(procedure) exists.

CREATE PROCEDURE (BlobCheckExisting).(usp_DoesStoredProcedureExist) 
@schemaName varchar(128),
@procedureName varchar(128)
AS
SELECT IIF (EXISTS (SELECT 1 FROM sys.procedures p INNER JOIN sys.schemas s ON p.(schema_id) = s.(schema_id) 
    WHERE s.(name) = @schemaName  AND p.(name) = @procedureName), 1, 0)
GO

When I tested with sa it selected 1 as I expected but when I tried with a minimum permission account which only granted EXECUTE to the procedure, it selected 0.

My assumption of stored procedure mechanism was role/user only requires EXECUTE to perform the procedure.
We don’t need to concern the permission setting of each DB object like CRUD to table and so on.

But it seems sys tables are exceptions? Or did I miss anything?
Moreover, If I don’t want to grant select sys.procedures/sys.schemas to the role. I just want my procedure to work as expected, what should I do?

applications – Will this Remove a Permission from an App?

So I downloaded an app from the web today, but it had some permissions I was uncomfortable with granting. So, I used APKTool to decompile the APK, removed the suspicious permission from the manifest, and recompiled + resigned the APK. Then, I downloaded the modified APK on my phone.

Does this approach work? My understanding is that now the app will crash if it tries to do something requiring that permission.


*PS: The reason I did this was because the permission to remove (CHANGE_WIFI_MULTICAST_STATE) did not show under settings/app Permissions of my phone. It only showed up under “All Permissions,” where I couldn’t simply disable it.