New answers tagged

0

How do I get current logged in user name when running a batch file as administrator It runs fine when the current user has local admin privileges, but for users who aren't I have to enter the domain administrator password for the changes to take place. With the below example you just set a variable with the environmental variables as you already ...


0

Ok self answering as I had some assistance on Technet. Unpadded "268435456" "Generic All" 29 bits - 10000000000000000000000000000 Unpadded "536870912" "Generic Execute" 30 bits - 100000000000000000000000000000 Unpadded "1073741824" "Generic Write" 31 bits - 1000000000000000000000000000000 Unpadded "-2147483648" "Generic Read" 32 Bits - ...


0

The CBS Persist logs are created by the Windows Module Installer service (TrustedInstaller.exe) and here Windows logs the status of it's work related to installing Windows updates and configuring features. The normal log goes to a file CBS.log, but to prevent, that the file gets too large Windows splits them into CBS Persist logs and later compresses them ...


1

You can change the permissions of almost any folder in Windows... just right click and click "share". Follow the sharing wizard and add the user to have read/write permissions... they can then open/map as desired...


1

The excess of DENY showed by icacls can be caused by the recent changes in cygwin dll (between 2.3 and current 2.5) . It took some round to be right and could have left files or directory with puzzling ACL. To sanitize the ACLs, a -b switch was added to setfacl setfacl -b foo For reference https://cygwin.com/cygwin-ug-net/ov-new.html#ov-new2.4s


0

The permissions on the root dir (/) were wrong! After I su to root I set the permission on / with: chmod a+x / And now I can run sudo.


0

Have you deleted multiple folders with the same name? I noted when I did that, the trash folder could only take up to around 20 of them. Once I hit 20 folders of the same name, I began getting that error. Renaming and then deleting worked, or just emptying the trash folder worked.


0

It appears I may have misinterpreted the question. If the script needs to be run as root regardless, and you want a regular user to be able to execute it, you can use follow the instructions found over on this AskUbuntu question. Keep in mind that you will need to have the permissions locked down tight in this file for this to be secure. Make the ...


1

If the only reason the script needs to be run as root is to read/write to your specific directory, there are two ways for you to solve this (to allow a regular user to run the script successfully): Created a group, make the folder you are working in owned by that group, and add the user to that group. sudo groupadd <groupname> sudo usermod -a -G &...


0

I ended up using the following solution: Boot into a live-CD linux distrubution Mount the disk in question as read-only Create a tarball on the destination drive , with the source drive as input This let me access every single file, bypassing permissions, and later I can access the tarball without any permission errors. I actually used a bash for loop ...


0

Samba with ecryptfs seems to be working for me on Ubuntu 14.04. I used this guide: http://www.cyberciti.biz/faq/adding-a-user-to-a-samba-smb-share/ My hunch is that the trick is to give the same password in: passwd USER and smbpasswd -a USER I am assuming ecryptfs picks up the password when it is given to Samba, I would love to hear a clarification ...


0

When you connect a previously used hard drive to a new or different computer, either as an internal or external drive, you will not have ownership of that drive. When you try to view, add or delete files on that drive, you will get an error message stating: “E:\ is not accessible. Access is denied.” Your drive letter may be different, but you get the idea. ...


0

While going through the Amazon documentation was helpful (as per @Ouroborus's answer), I finally figured how to repair this mess that I got myself into. Let's see if I can recall all the steps... Prepare a New Instance Easiest way to match your existing instance as closely as possible is to go under My AMIs and select the same AMI image used by your ...


1

With Windows Vista and newer Administrator users do not have administrator privileges unless you go through a UAC prompt. Because of this when you assign the Administrators group to the drive you don't actually count twoard it in normal use of Windows. Open the security tab for the drive, edit the settings, and add the USERS group. On that group give them "...


0

Well, it seems that the cause of this issue was that snagit 8 printer has to be placed as default and it wasn't otherwise if there is another printer as default then the program would close as soon as it opens and i don't know why this is happening maybe it has to do with something that software developers at work made the program with but this resolved the ...


0

Being the owner of an object only gives you a very specific kind of access: the ability to read and write the access control list. Before you can delete that folder, you need to use the Permissions tab to add an entry that gives you appropriate privileges - Full Control works fine. (If there's a Change permissions button, you'll need to press it first.) If ...


2

sudo(8) as installed by pkgsrc is configured to look in /usr/pkg/etc/sudoers. It will not look at /etc/sudoers. If you're updating your access control via visudo(8), it should be modifying the correct file. If you're not updating the sudoers file via visudo(8), please start doing so.


3

It sounds like you are looking for details about default "built-in" groups for the Windows platform. You can find details about that in the Windows Server documentation for Default local groups.


2

Yeah, you've broken it real good. You can't sudo because of ownership and Amazon's instances are setup to disallow root without sudo access. If restarting the instance didn't work then the changes you made are stored on the EBS volume you had attached. Fixing it involves starting up another, fresh instance and using that to mount and alter the EBS volume ...


1

Files saved on FAT32 file system can be executed from Linux, Your problem is elsewhere. When attaching FAT32 to Linux permissions are set with the mount and thus only once. Any attempts to change permissions to already connected FAT32 are silently ignored. Because Ubuntu generally connects the flash drive automatically, it explicitly passes 'noexec' ...


0

To give a specific group access to a USB device you have to add a rule to udev in /etc/udev/rules.d/. I added a file called 50-MyDevice.rules that contains this line: SUBSYSTEM=="usb",ATTRS{idVendor}=="abcd",ATTRS{idProduct}=="1234",MODE="0660",GROUP="mygroup",SYMLINK+="mydevice%n" Where I have replaced the values after idVendor and idProduct with the USB ...


1

Looking at source. Try set permissions 0200 or 0600. sub _check_for_unsafe_permissions { my ($self) = @_; my %test_files = ( '/etc/shadow' => { 'perms' => [ 0200, 0600 ], 'uid' => 0, 'gid' => 0 }, '/etc/passwd' => { 'perms' => [0644], 'uid' => 0, 'gid' => 0 } ); for my $file ( keys %test_files ) { my $...


0

I've found a clue regarding my issue, because i use the CentOS 7, there is some security call SE Linux (Security Enhance Linux), it's hidden firewall for Centos. I'm following this article and my captcha working correctly right know, because they can write into the particular directory. https://blog.lysender.com/2015/07/centos-7-selinux-php-apache-cannot-...


0

I created my site using Powershell, so I added the following to create the exact folder based on the Site ID. Import-Module WebAdministration $iisAppName = "MySite" $site = Get-ItemProperty IIS:\Sites\$iisAppName $folderName = "W3SVC" + $site.id #Create a folder based on the actual site id $iisLogPath = "C:\MyLogFolder" $folderPath = Join-Path $...


2

We can place validation at the beginning of script. userid=`id -u -n` #echo "$userid" ; ownuser=`ls -l ${abosolutepath}/${your_script.sh} | awk '{print $3}'` #echo "$ownuser" ; if [ ! "$userid" = "$ownuser" ]; then echo permission denied exit 1 fi Above validation will check if the user who executing this script is same as user who own ...


0

I have to compress a directory using tar.gz preserving not only permissions, but ownership/groups too. By default, tar will preserve file permissions and ownership when creating the archive. To extract file permissions and ownership, you will need to run tar as root when extracting, since changing file ownership usually requires superuser privileges. See ...


1

Check this answer : Cannot delete flash9.ocx , for me it worked when removing old Windows folder from a second partition which was primarily boot partition before adding an SSD to my laptop. Basically, Adobe just denies the user to change Write attributes on their OCX files. In my case, as also explained on the above link, Everyone had Deny checked; after ...


2

In general, this is not possible. Any user who is able to execute a shell is also able to execute any shell script they can read. The shell does not really distinguish between commands that come from the terminal and commands that come from a file. So you would probably need some kind of restricted "shell". In principle, any program can be used as a login ...


2

Without involving ACL or SELinux the only way I find is adding at the beginning of the script this: if [ "$USER" = "ronly" ]; then echo 'Access denied' exit 1 fi This is far from perfect because: The user ronly can read the script, so he can copy the contents to a script in his own home and execute it. Any user can freely set their $USER environment ...


1

You rather want to use usermod -g www-data ankush as error messages pointed out, for once clearly(*), user ankush already exists. The command useradd do not add user to group, but create user. (*) this is not always the cases in unix/linux world. you might have a look at man page from usermod and useradd.



Top 50 recent answers are included